CVE-2022-50295
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
15/09/2025
Last modified:
15/09/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
io_uring/msg_ring: Fix NULL pointer dereference in io_msg_send_fd()<br />
<br />
Syzkaller produced the below call trace:<br />
<br />
BUG: KASAN: null-ptr-deref in io_msg_ring+0x3cb/0x9f0<br />
Write of size 8 at addr 0000000000000070 by task repro/16399<br />
<br />
CPU: 0 PID: 16399 Comm: repro Not tainted 6.1.0-rc1 #28<br />
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.11.0-2.el7<br />
Call Trace:<br />
<br />
dump_stack_lvl+0xcd/0x134<br />
? io_msg_ring+0x3cb/0x9f0<br />
kasan_report+0xbc/0xf0<br />
? io_msg_ring+0x3cb/0x9f0<br />
kasan_check_range+0x140/0x190<br />
io_msg_ring+0x3cb/0x9f0<br />
? io_msg_ring_prep+0x300/0x300<br />
io_issue_sqe+0x698/0xca0<br />
io_submit_sqes+0x92f/0x1c30<br />
__do_sys_io_uring_enter+0xae4/0x24b0<br />
....<br />
RIP: 0033:0x7f2eaf8f8289<br />
RSP: 002b:00007fff40939718 EFLAGS: 00000246 ORIG_RAX: 00000000000001aa<br />
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f2eaf8f8289<br />
RDX: 0000000000000000 RSI: 0000000000006f71 RDI: 0000000000000004<br />
RBP: 00007fff409397a0 R08: 0000000000000000 R09: 0000000000000039<br />
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000004006d0<br />
R13: 00007fff40939880 R14: 0000000000000000 R15: 0000000000000000<br />
<br />
Kernel panic - not syncing: panic_on_warn set ...<br />
<br />
We don&#39;t have a NULL check on file_ptr in io_msg_send_fd() function,<br />
so when file_ptr is NUL src_file is also NULL and get_file()<br />
dereferences a NULL pointer and leads to above crash.<br />
<br />
Add a NULL check to fix this issue.



