From: Eric Dumazet <eric.dumazet@gmail.com>
To: Edward Adam Davis <eadavis@qq.com>,
pmenzel@molgen.mpg.de, edumazet@google.com
Cc: netdev@vger.kernel.org, johan.hedberg@gmail.com,
linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org,
luiz.dentz@gmail.com, marcel@holtmann.org,
syzbot+d4ecae01a53fd9b42e7d@syzkaller.appspotmail.com,
syzkaller-bugs@googlegroups.com
Subject: Re: [PATCH] net/socket: Ensure length of input socket option param >= sizeof(int)
Date: Tue, 9 Apr 2024 15:07:41 +0200 [thread overview]
Message-ID: <7cf0848b-f44c-42ad-848a-369a249bff77@gmail.com> (raw)
In-Reply-To: <tencent_15CA920ADD9ADDCA19654FBE8DB5A5B88D07@qq.com>
On 4/9/24 14:15, Edward Adam Davis wrote:
> The optlen value passed by syzbot to _sys_setsockopt() is 2, which results in
> only 2 bytes being allocated when allocating memory to kernel_optval, and the
> optval size passed when calling the function copy_from_sockptr() is 4 bytes.
> Here, optlen is determined uniformly in the entry function __sys_setsockopt().
> If its value is less than 4, the parameter is considered invalid.
>
> Reported-by: syzbot+837ba09d9db969068367@syzkaller.appspotmail.com
> Reported-by: syzbot+b71011ec0a23f4d15625@syzkaller.appspotmail.com
> Reported-by: syzbot+d4ecae01a53fd9b42e7d@syzkaller.appspotmail.com
> Signed-off-by: Edward Adam Davis <eadavis@qq.com>
I think I gave my feedback already.
Please do not ignore maintainers feedback.
This patch is absolutely wrong.
Some setsockopt() deal with optlen == 1 just fine, thank you very much.
next prev parent reply other threads:[~2024-04-09 13:07 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-05 6:55 [syzbot] [bluetooth?] KASAN: slab-out-of-bounds Read in rfcomm_sock_setsockopt syzbot
2024-04-05 9:30 ` Edward Adam Davis
2024-04-06 0:52 ` syzbot
2024-04-05 10:16 ` [PATCH] net/socket: the length value of the input socket option parameter is too small Edward Adam Davis
2024-04-05 11:08 ` Paul Menzel
2024-04-09 12:15 ` [PATCH] net/socket: Ensure length of input socket option param >= sizeof(int) Edward Adam Davis
2024-04-09 13:07 ` Eric Dumazet [this message]
2024-04-09 13:25 ` Luiz Augusto von Dentz
2024-04-09 13:36 ` [PATCH] Bluetooth: fix oob in rfcomm_sock_setsockopt Edward Adam Davis
2024-04-09 14:11 ` Luiz Augusto von Dentz
2024-04-09 14:01 ` [PATCH] net/socket: Ensure length of input socket option param >= sizeof(int) Edward Adam Davis
2024-04-09 14:17 ` Eric Dumazet
2024-04-09 18:27 ` Jakub Kicinski
2024-04-05 11:39 ` [PATCH] net/socket: the length value of the input socket option parameter is too small Eric Dumazet
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=7cf0848b-f44c-42ad-848a-369a249bff77@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=eadavis@qq.com \
--cc=edumazet@google.com \
--cc=johan.hedberg@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
--cc=marcel@holtmann.org \
--cc=netdev@vger.kernel.org \
--cc=pmenzel@molgen.mpg.de \
--cc=syzbot+d4ecae01a53fd9b42e7d@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®