diff options
| author | Edward Adam Davis <eadavis@qq.com> | 2025-12-04 21:16:22 +0800 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2025-12-05 13:57:39 +0100 |
| commit | 8cf01d0c4372ef5777d20c3c3a83936fd1c670f8 (patch) | |
| tree | 515b452d0dd8c4e2d5acf619756ed284f21daf9b /tools/lib/python/abi/helpers.py | |
| parent | afb9917d9b374ecb77d478c2a052e20875c6e232 (diff) | |
mqueue: correct the type of ro to int
The ro variable, being of type bool, caused the -EROFS return value from
mnt_want_write() to be implicitly converted to 1. This prevented the file
from being correctly acquired, thus triggering the issue reported by
syzbot [1].
Changing the type of ro to int allows the system to correctly identify
the reason for the file open failure.
[1]
KASAN: null-ptr-deref in range [0x0000000000000040-0x0000000000000047]
Call Trace:
do_mq_open+0x5a0/0x770 ipc/mqueue.c:932
__do_sys_mq_open ipc/mqueue.c:945 [inline]
__se_sys_mq_open ipc/mqueue.c:938 [inline]
__x64_sys_mq_open+0x16a/0x1c0 ipc/mqueue.c:938
Fixes: f2573685bd0c ("ipc: convert do_mq_open() to FD_ADD()")
Reported-by: syzbot+40f42779048f7476e2e0@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=40f42779048f7476e2e0
Tested-by: syzbot+40f42779048f7476e2e0@syzkaller.appspotmail.com
Signed-off-by: Edward Adam Davis <eadavis@qq.com>
Link: https://patch.msgid.link/tencent_369728EA76ED36CD98793A6D942C956C4C0A@qq.com
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'tools/lib/python/abi/helpers.py')
0 files changed, 0 insertions, 0 deletions
