From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B85BDC4708C for ; Tue, 6 Dec 2022 11:49:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234724AbiLFLtf (ORCPT ); Tue, 6 Dec 2022 06:49:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234407AbiLFLtd (ORCPT ); Tue, 6 Dec 2022 06:49:33 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB53E17416; Tue, 6 Dec 2022 03:49:32 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 699FCB819AE; Tue, 6 Dec 2022 11:49:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BE8C4C433D6; Tue, 6 Dec 2022 11:49:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1670327370; bh=jpNRSCrAwScrzo73RHAzCPD2+2OMYIYifGr0nc1dD2s=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=zRq5mG4R2BQSp3uA10kQ8Tdt24sbMMLIo2JCqM15zQ/xqAPqoJCrwvkkCr85xbknK oZIV0jJIUIPBR74tqcoTADheFOFYoyZ71L8nw9mNJBcrxoQPHqqSPtaY0cHuR1OP1o D6xrEO6DG8LI2tsebL7KXjXeei11gSmHMYMR6eFo= Date: Tue, 6 Dec 2022 12:49:27 +0100 From: Greg KH To: Cengiz Can Cc: Luiz Augusto von Dentz , linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: Regarding 711f8c3fb3db "Bluetooth: L2CAP: Fix accepting connection request for invalid SPSM" Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, Dec 06, 2022 at 02:27:27PM +0300, Cengiz Can wrote: > Hello Luiz Augusto, > > > I'm by no means a bluetooth expert so please bear with me if my > questions sound dumb or pointless. > > > I'm trying to backport commit 711f8c3fb3db ("Bluetooth: L2CAP: Fix > accepting connection request for invalid SPSM") to v4.15.y and older > stable kernels. (CVE-2022-42896) > > > According to the changes to `net/bluetooth/l2cap_core.c` there are two > functions that need patching: > > > * l2cap_le_connect_req > * l2cap_ecred_conn_req > > > > Only the former exists in kernels <= v4.15.y. So I decided to skip > > l2cap_ecred_conn_req for older kernels. > > > Do you think this would be enough to mitigate the issue? > > > > If so, older kernels also lack definitions of L2CAP_CR_LE_BAD_PSM and > > L2CAP_PSM_LE_DYN_END. > > > I see that L2CAP_CR_LE_BAD_PSM is basically the same as > L2CAP_CR_BAD_PSM so I used it to signify an error. > > > I think it should be enough for the sake of a backport. > > > What do you think? I've already done this backport and it is in the latest -rc1 stable kernel releases. Is it not working for you there? Why do it again? thanks, greg k-h