From: Hillf Danton <hdanton@sina.com>
To: syzbot <syzbot+1e811482aa2c70afa9a0@syzkaller.appspotmail.com>
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [io-uring] general protection fault in tomoyo_socket_bind_permission
Date: Sat, 13 Jul 2024 17:29:25 +0800 [thread overview]
Message-ID: <20240713092925.927-1-hdanton@sina.com> (raw)
In-Reply-To: <0000000000007b7ce6061d1caec0@google.com>
On Sat, 13 Jul 2024 01:21:23 -0700
> syzbot found the following issue on:
>
> HEAD commit: 3fe121b62282 Add linux-next specific files for 20240712
> git tree: linux-next
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=10c2be31980000
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 3fe121b62282
--- x/io_uring/net.c
+++ y/io_uring/net.c
@@ -1742,8 +1742,12 @@ int io_bind(struct io_kiocb *req, unsign
struct io_bind *bind = io_kiocb_to_cmd(req, struct io_bind);
struct io_async_msghdr *io = req->async_data;
int ret;
+ struct socket *sk;
- ret = __sys_bind_socket(sock_from_file(req->file), &io->addr, bind->addr_len);
+ sk = sock_from_file(req->file);
+ if (!sk)
+ return -ENOTSOCK;
+ ret = __sys_bind_socket(sk, &io->addr, bind->addr_len);
if (ret < 0)
req_set_fail(req);
io_req_set_res(req, ret, 0);
--
next prev parent reply other threads:[~2024-07-13 9:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-13 8:21 syzbot
2024-07-13 9:29 ` Hillf Danton [this message]
2024-07-13 10:03 ` syzbot
2024-07-13 10:05 ` [PATCH] io_uring: Check socket is valid in io_bind()/io_listen() Tetsuo Handa
2024-07-13 12:38 ` Jens Axboe
2024-07-13 12:40 ` Jens Axboe
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=20240713092925.927-1-hdanton@sina.com \
--to=hdanton@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+1e811482aa2c70afa9a0@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®