Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3642950pxf; Mon, 15 Mar 2021 14:46:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz4AL1dHVlbbzTaxFODGWJf5ewIjSnBz8bFUtnx2RWFYv+PMSsOsPn02bD406bqzm2+u5dP X-Received: by 2002:a05:6402:354d:: with SMTP id f13mr32566119edd.228.1615844792839; Mon, 15 Mar 2021 14:46:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615844792; cv=none; d=google.com; s=arc-20160816; b=yIPnq9ges4s+tk1ZTLaLLts7xrjqu+w4VY4he10+W/Sv7R7k1V8GDWVroREuiKFYrM iltiknI/d/kkt+I+u6scLLbtdLXDI1oUZJFSd+74rZvs6rzLFC05FiCG0janlenIy9ag NMOs4GHokCh1p69C2HTpctEQ/8V7B88qMyaLVfZtH9Fe/NAllbkz9foyIdxVJMFVX2ne rqCc4HK5YjKJW6OsCQWukF/QWLRWfdqeb4u+ADLmv9t306xpsce4v9MqQUCvr0BSmyvV zmdbk3kXNG//x0XmcEAK3Zb8BOVukv5y3Kr0ZBO1O5zB0aN/diexi5hUZLtE9ZnQjOJZ KH6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=D966Xj7TcGyA0y8uL1mJ8z+6iDnYzl1fywLw9kK1M1c=; b=zOrIHQyOo34hcCivEInNHz2ZS/xA5UvAbQlF8bRcufiJ4jl5KFXWSkgtSM1Uj0S0eE 2vdGywI7puzQfzSNQAsUu0f+Mz3Soi5+oePWYzLw81OBYZt3mRpm0U51yQJTALM+/jxq VCyTa/AcmTEWya8fmPWjaySaRhrtdNTx7SeDxBQTFrETJ06PHkVEQD7x45hb7a8N1DaS xubcjNEKZPUBcMAH2cGJwcqjmCajp9u9ASVXcD8eozWx7VoBdCWW2h5pgrYTG/TDi1c7 RD5WSGLr1W65OwT+NOOqLMBKQ1lb2Z/2xFchezlh1WdJudzjPVsP5nlch4lUxDnqfJlN mc+Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r25si11753235ejs.195.2021.03.15.14.46.10; Mon, 15 Mar 2021 14:46:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232670AbhCOUJ3 (ORCPT + 99 others); Mon, 15 Mar 2021 16:09:29 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:52550 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233831AbhCOUJV (ORCPT ); Mon, 15 Mar 2021 16:09:21 -0400 Received: from marcel-macbook.holtmann.net (p4fefc126.dip0.t-ipconnect.de [79.239.193.38]) by mail.holtmann.org (Postfix) with ESMTPSA id AAB83CECE5; Mon, 15 Mar 2021 21:16:56 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Subject: Re: [PATCH v2] Bluetooth: L2CAP: Fix not checking for maximum number of DCID From: Marcel Holtmann In-Reply-To: <20210315200437.1800434-1-luiz.dentz@gmail.com> Date: Mon, 15 Mar 2021 21:09:19 +0100 Cc: linux-bluetooth@vger.kernel.org Content-Transfer-Encoding: 7bit Message-Id: <0BE392E6-430C-4F29-8C6D-F1A9568FAA85@holtmann.org> References: <20210315200437.1800434-1-luiz.dentz@gmail.com> To: Luiz Augusto von Dentz X-Mailer: Apple Mail (2.3654.60.0.2.21) Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Luiz, > When receiving L2CAP_CREDIT_BASED_CONNECTION_REQ the remote may request > more channels than allowed by the spec (10 octecs = 5 CIDs) so this > checks if the number of channels is bigger than the maximum allowed and > respond with an error. > > Signed-off-by: Luiz Augusto von Dentz > --- > v2: Respond with an error instead of truncating the response with maximum > allowed nunber of channels. > > include/net/bluetooth/l2cap.h | 1 + > net/bluetooth/l2cap_core.c | 12 +++++++++--- > 2 files changed, 10 insertions(+), 3 deletions(-) patch has been applied to bluetooth-next tree. Regards Marcel