From: Greg KH <gregkh@linuxfoundation.org>
To: Keerthana K <keerthana.kalyanasundaram@broadcom.com>
Cc: stable@vger.kernel.org, marcel@holtmann.org,
johan.hedberg@gmail.com, luiz.dentz@gmail.com,
davem@davemloft.net, kuba@kernel.org,
linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, ajay.kaher@broadcom.com,
alexey.makhalov@broadcom.com, vasavi.sirnapalli@broadcom.com,
Luiz Augusto von Dentz <luiz.von.dentz@intel.com>,
syzbot <syzkaller@googlegroups.com>,
Eric Dumazet <edumazet@google.com>,
Sasha Levin <sashal@kernel.org>
Subject: Re: [PATCH v5.10-v5.15] Bluetooth: RFCOMM: Fix not validating setsockopt user input
Date: Mon, 20 Jan 2025 16:41:34 +0100 [thread overview]
Message-ID: <2025012010-manager-dreamlike-b5c1@gregkh> (raw)
In-Reply-To: <20250120064647.3448549-1-keerthana.kalyanasundaram@broadcom.com>
On Mon, Jan 20, 2025 at 06:46:47AM +0000, Keerthana K wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>
> [ Upstream commit a97de7bff13b1cc825c1b1344eaed8d6c2d3e695 ]
>
> syzbot reported rfcomm_sock_setsockopt_old() is copying data without
> checking user input length.
>
> BUG: KASAN: slab-out-of-bounds in copy_from_sockptr_offset
> include/linux/sockptr.h:49 [inline]
> BUG: KASAN: slab-out-of-bounds in copy_from_sockptr
> include/linux/sockptr.h:55 [inline]
> BUG: KASAN: slab-out-of-bounds in rfcomm_sock_setsockopt_old
> net/bluetooth/rfcomm/sock.c:632 [inline]
> BUG: KASAN: slab-out-of-bounds in rfcomm_sock_setsockopt+0x893/0xa70
> net/bluetooth/rfcomm/sock.c:673
> Read of size 4 at addr ffff8880209a8bc3 by task syz-executor632/5064
>
> Fixes: 9f2c8a03fbb3 ("Bluetooth: Replace RFCOMM link mode with security level")
> Fixes: bb23c0ab8246 ("Bluetooth: Add support for deferring RFCOMM connection setup")
> Reported-by: syzbot <syzkaller@googlegroups.com>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> Signed-off-by: Sasha Levin <sashal@kernel.org>
> Signed-off-by: Keerthana K <keerthana.kalyanasundaram@broadcom.com>
> ---
> net/bluetooth/rfcomm/sock.c | 14 +++++---------
> 1 file changed, 5 insertions(+), 9 deletions(-)
This breaks the build on 5.15.y systems, did you test it?
I'm dropping both patches now, please be more careful.
greg k-h
next prev parent reply other threads:[~2025-01-20 15:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-20 6:46 [PATCH v5.10-v5.15] Bluetooth: RFCOMM: Fix not validating setsockopt user input Keerthana K
2025-01-20 7:15 ` [v5.10-v5.15] " bluez.test.bot
2025-01-20 14:41 ` [PATCH v5.10-v5.15] " Sasha Levin
2025-01-20 15:41 ` Greg KH [this message]
2025-01-24 5:43 ` Keerthana Kalyanasundaram
2025-01-24 6:13 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2025012010-manager-dreamlike-b5c1@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=ajay.kaher@broadcom.com \
--cc=alexey.makhalov@broadcom.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=johan.hedberg@gmail.com \
--cc=keerthana.kalyanasundaram@broadcom.com \
--cc=kuba@kernel.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
--cc=luiz.von.dentz@intel.com \
--cc=marcel@holtmann.org \
--cc=netdev@vger.kernel.org \
--cc=sashal@kernel.org \
--cc=stable@vger.kernel.org \
--cc=syzkaller@googlegroups.com \
--cc=vasavi.sirnapalli@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.