Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7280753rwb; Tue, 6 Dec 2022 03:50:16 -0800 (PST) X-Google-Smtp-Source: AA0mqf6HmptSPD365LDvsSlUas97/ZIL1j9c8ZD+UFA8QPGd0LBb7s52cZ4No+v8JggKn6alWADs X-Received: by 2002:aa7:954d:0:b0:576:f9e2:a968 with SMTP id w13-20020aa7954d000000b00576f9e2a968mr8958878pfq.84.1670327415926; Tue, 06 Dec 2022 03:50:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670327415; cv=none; d=google.com; s=arc-20160816; b=VtG0ThTqIoQJbgTgcH7/4BdV5o6Vk//OWu5LjsPt9ZxJgnMbSpRslchI50smdSycvD sX4TQ5goMVZw0lKdBCGMYWSHiah0jdppRLBWY9fYQarOtnFV7Sgu90UONJ6F10QeuqKU vFdBmHHvkZkvw8wLc7vPJNUaXcd9H/KOEIFQzH0q82BT0+SvWFQMNLKnZgDw48HE765+ XKJ+xQJMu5DEM/MvTTpBFCqCP2GV+MTp8w7aSauFregXsyeFw7UzgOKn3jEsTzRjkcp+ jQPOJTKSYDEtCipNJLiSsJwu/XCeKWM7ns/p7b7P76VEkyDw8X4qGx8hCn2YEpJINq76 3dPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=fzrUEHWv33XQ1gF9dlLJDPLW6/fJ1Ha42+hE++6GcWo=; b=fn9MO4GsqKRfFVZfNwAb86YU9nj8fy9RGHJGYcQXnNQ2NdurA+KWj5rZZwsh1qmQiy EoSgsVyxmWqu0q3bMEI6eSdlyE+cL7LQwPKRSGEw7XNdAao7ckwBv1VKp3pD+KxSVKC7 JQBK97tvY+ejLtOAYIo5VWrCYxgjta0H85K7bNttNhpqz9UpCHi0hYofQw09kS5HWW1d 4fUE2Pp3C+huXGcupaqYcNjWcenGdGKIsyfZd+MK50aAR4kaZTw0hCCax2ozstAcRTjI uAD8/qpEMCTGyWrLD6+GUOT++cTEYhDxxAcjiUh4b684cYLz4HkB/JDaNvoFBXkRw/59 wiaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zRq5mG4R; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g6-20020a056a001a0600b00556c1c66b61si17839294pfv.143.2022.12.06.03.49.53; Tue, 06 Dec 2022 03:50:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zRq5mG4R; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234609AbiLFLte (ORCPT + 99 others); Tue, 6 Dec 2022 06:49:34 -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: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@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