Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp518832imm; Wed, 1 Aug 2018 00:17:35 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeRUyXzzPJwJd0EhyiWUjenBq/G/Dc/1ZstdVtBnAJlpvi93eEjfZ18UUyjMlCym5huVeya X-Received: by 2002:a65:4cc5:: with SMTP id n5-v6mr23180935pgt.451.1533107855005; Wed, 01 Aug 2018 00:17:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533107854; cv=none; d=google.com; s=arc-20160816; b=K7ZCSLeY5lXoX3b6xngs43TcknmsnpSAIzyHLPDNGLVP8EccOmQ6JE+Hml5GwRzCfz 8aVth8JnsGCflWHoyg5rH06iK1F4WrH+B866Adur0kef5yIe4yFBsL46LKPVuKvF8XMx Aq+tnPP68lqmaCQdFOWARloYwVNrfJ43Em+UzLUXIhpLWsdU3cBzZOURibNHr2aPLxE+ nfBggfab1G3pk0N60Jfj9hKWHlX31/8tEmwqjCK3zo4gI6xJCu9UrmtfpAYTHee836Na LdopPlEWh5ooKefTzs0KyWe/vnH/9X5qxD69ivCD9mEBPI6b+hEzgqtVJcyiSL0iPzwO mgcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:arc-authentication-results; bh=045nqtOdlQ/aKyroX3jcXN8hMbsGGKSHhTGBSXy5pCc=; b=Zuz/20KGiCTb+MknJLgW5kKMaIzTrcv8rvdxVsfaM3W/gXSOXEepPZ6KU/zvLgDbQr EAMlIht+GmQH+Bm9Z8qs0Qn6zXN9RnC5CeZazqmUFwGxZjSkKsLZ0Y5I3uN/ZYTUu/I8 vAqPI/SgcoBVxvarDVzlsA3vkT/QQdOxJohYiBf4k/1Wz9WtFic5obNWmtA0/Lp1iYJB eytvoR2yH4vryhzBpSd0Qaus4mjRD8jyFcgYPFAuWZzybP0TbBQf7KVgDRg6wTehEKHz lFUgMc5LCaX3MQe1rROznkHOiqIazjp2Q7N7p9qBY0nURhfIIIeqJFx/h0zEgMZvpia9 /Dlg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l190-v6si14863963pgd.375.2018.08.01.00.17.20; Wed, 01 Aug 2018 00:17:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733294AbeHAJAq convert rfc822-to-8bit (ORCPT + 99 others); Wed, 1 Aug 2018 05:00:46 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:50190 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733123AbeHAJAq (ORCPT ); Wed, 1 Aug 2018 05:00:46 -0400 Received: from marcel-macpro.fritz.box (p4FEFCC41.dip0.t-ipconnect.de [79.239.204.65]) by mail.holtmann.org (Postfix) with ESMTPSA id 9A087CF355; Wed, 1 Aug 2018 09:23:28 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: [PATCH] HID: Bluetooth: hidp: buffer overflow in hidp_process_report From: Marcel Holtmann In-Reply-To: <20180731220225.159741-1-salyzyn@android.com> Date: Wed, 1 Aug 2018 09:16:29 +0200 Cc: linux-kernel@vger.kernel.org, Johan Hedberg , "David S. Miller" , Kees Cook , Benjamin Tissoires , linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org, security@kernel.org, kernel-team@android.com, Jiri Kosina Content-Transfer-Encoding: 8BIT Message-Id: <037EC694-953E-4510-9B34-64035958918D@holtmann.org> References: <20180731220225.159741-1-salyzyn@android.com> To: Mark Salyzyn X-Mailer: Apple Mail (2.3445.9.1) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mark, > CVE-2018-9363 > > The buffer length is unsigned at all layers, but gets cast to int and > checked in hidp_process_report and can lead to a buffer overflow. > Switch len parameter to unsigned int to resolve issue. > > This affects 3.18 and newer kernels. > > Signed-off-by: Mark Salyzyn > Fixes: a4b1b5877b514b276f0f31efe02388a9c2836728 ("HID: Bluetooth: hidp: make sure input buffers are big enough") > Cc: Marcel Holtmann > Cc: Johan Hedberg > Cc: "David S. Miller" > Cc: Kees Cook > Cc: Benjamin Tissoires > Cc: linux-bluetooth@vger.kernel.org > Cc: netdev@vger.kernel.org > Cc: linux-kernel@vger.kernel.org > Cc: security@kernel.org > Cc: kernel-team@android.com > --- > net/bluetooth/hidp/core.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) patch has been applied to bluetooth-next tree. Regards Marcel