kernel BUG in notify_change

12 views
Skip to first unread message

syzbot

unread,
Oct 16, 2022, 11:29:37 AM10/16/22
to syzkaller-a...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 44b8b2ac1d96 Merge 5.15.73 into android13-5.15-lts
git tree: android13-5.15-lts
console+strace: https://syzkaller.appspot.com/x/log.txt?x=1567f294880000
kernel config: https://syzkaller.appspot.com/x/.config?x=c7f461eef7aac48
dashboard link: https://syzkaller.appspot.com/bug?extid=fcb6592762d7a9ae57f0
compiler: Debian clang version 13.0.1-++20220126092033+75e33f71c2da-1~exp1~20220126212112.63, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=127431e6880000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1468f10c880000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/eae95419fc66/disk-44b8b2ac.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/40ad978c1f0f/vmlinux-44b8b2ac.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+fcb659...@syzkaller.appspotmail.com

kernel BUG at fs/attr.c:377!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 412 Comm: syz-executor879 Not tainted 5.15.73-syzkaller-04348-g44b8b2ac1d96 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022
RIP: 0010:notify_change+0x103e/0x1040 fs/attr.c:377
Code: f0 ff e9 61 fa ff ff 44 89 e1 80 e1 07 80 c1 03 38 c1 0f 8c 79 f5 ff ff 4c 89 e7 e8 2c 12 f0 ff e9 6c f5 ff ff e8 92 c5 ad ff <0f> 0b 55 48 89 e5 41 57 41 56 41 55 41 54 53 50 41 89 f4 49 89 fd
RSP: 0018:ffffc900002cfaf0 EFLAGS: 00010293
RAX: ffffffff81c3cbfe RBX: 0000000000001847 RCX: ffff8881071813c0
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: ffffc900002cfb78 R08: ffffffff81c3c198 R09: ffffc900002cfa60
R10: fffff52000059f4e R11: 1ffff92000059f4c R12: ffffc900002cfd40
R13: ffff88811e069cc0 R14: dffffc0000000000 R15: 0000000000000001
FS: 0000555555d6b300(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000100 CR3: 000000011f755000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
incfs_setattr+0x238/0x3c0 fs/incfs/vfs.c:1628
notify_change+0xd8f/0x1040 fs/attr.c:426
chown_common+0x526/0x7e0 fs/open.c:681
do_fchownat+0x175/0x250 fs/open.c:712
__do_sys_chown fs/open.c:732 [inline]
__se_sys_chown fs/open.c:730 [inline]
__x64_sys_chown+0x82/0x90 fs/open.c:730
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f0aecbc2ba9
Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd8da001a8 EFLAGS: 00000246 ORIG_RAX: 000000000000005c
RAX: ffffffffffffffda RBX: 0030656c69662f2e RCX: 00007f0aecbc2ba9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000300
RBP: 2f30656c69662f2e R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f0aecb86de0
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
</TASK>
Modules linked in:
---[ end trace 81a5101ef8a25cb2 ]---
RIP: 0010:notify_change+0x103e/0x1040 fs/attr.c:377
Code: f0 ff e9 61 fa ff ff 44 89 e1 80 e1 07 80 c1 03 38 c1 0f 8c 79 f5 ff ff 4c 89 e7 e8 2c 12 f0 ff e9 6c f5 ff ff e8 92 c5 ad ff <0f> 0b 55 48 89 e5 41 57 41 56 41 55 41 54 53 50 41 89 f4 49 89 fd
RSP: 0018:ffffc900002cfaf0 EFLAGS: 00010293
RAX: ffffffff81c3cbfe RBX: 0000000000001847 RCX: ffff8881071813c0
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: ffffc900002cfb78 R08: ffffffff81c3c198 R09: ffffc900002cfa60
R10: fffff52000059f4e R11: 1ffff92000059f4c R12: ffffc900002cfd40
R13: ffff88811e069cc0 R14: dffffc0000000000 R15: 0000000000000001
FS: 0000555555d6b300(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000100 CR3: 000000011f755000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches

Jun Nie

unread,
Nov 22, 2022, 11:13:08 PM11/22/22
to syzkaller-android-bugs
#syz test https://android.googlesource.com/kernel/common android13-5.15-lts

--- a/fs/incfs/vfs.c
+++ b/fs/incfs/vfs.c
@@ -1608,6 +1608,10 @@ static int incfs_setattr(struct user_namespace *ns, struct dentry *dentry,
        if (ia->ia_valid & ATTR_SIZE)
                return -EINVAL;
 
+       if ((ia->ia_valid & (ATTR_KILL_SUID|ATTR_KILL_SGID)) &&
+           (ia->ia_valid & ATTR_MODE))
+               return -EINVAL;
+
        if (!di)
                return -EINVAL;
        backing_dentry = di->backing_path.dentry;

nogikh

unread,
Nov 23, 2022, 5:03:35 AM11/23/22
to syzkaller-android-bugs

nogikh

unread,
Nov 23, 2022, 5:05:07 AM11/23/22
to syzkaller-android-bugs
.. and once more


#syz test https://android.googlesource.com/kernel/common android13-5.15-lts

--- a/fs/incfs/vfs.c
+++ b/fs/incfs/vfs.c
@@ -1608,6 +1608,10 @@ static int incfs_setattr(struct user_namespace *ns, struct dentry *dentry,
        if (ia->ia_valid & ATTR_SIZE)
                return -EINVAL;
 
+       if ((ia->ia_valid & (ATTR_KILL_SUID|ATTR_KILL_SGID)) &&
+           (ia->ia_valid & ATTR_MODE))
+               return -EINVAL;
+
        if (!di)
                return -EINVAL;
        backing_dentry = di->backing_path.dentry;

syzbot

unread,
Nov 25, 2022, 12:39:40 PM11/25/22
to jun...@linaro.org, jun...@linaro.org, syzkaller-a...@googlegroups.com
> #syz test https://android.googlesource.com/kernel/common android13-5.15-lts

I see the command but can't find the corresponding bug.
Please resend the email to syzbo...@syzkaller.appspotmail.com address
that is the sender of the bug report (also present in the Reported-by tag).

>
> --- a/fs/incfs/vfs.c
> +++ b/fs/incfs/vfs.c
> @@ -1608,6 +1608,10 @@ static int incfs_setattr(struct user_namespace *ns,
> struct dentry *dentry,
> if (ia->ia_valid & ATTR_SIZE)
> return -EINVAL;
>
> + if ((ia->ia_valid & (ATTR_KILL_SUID|ATTR_KILL_SGID)) &&
> + (ia->ia_valid & ATTR_MODE))
> + return -EINVAL;
> +
> if (!di)
> return -EINVAL;
> backing_dentry = di->backing_path.dentry;
>
> --
> You received this message because you are subscribed to the Google Groups "syzkaller-android-bugs" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to syzkaller-android...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/syzkaller-android-bugs/a441f21d-6c28-4a53-9b1b-655d8b86eb23n%40googlegroups.com.

syzbot

unread,
Nov 25, 2022, 12:39:40 PM11/25/22
to nog...@google.com, nog...@google.com, syzkaller-a...@googlegroups.com
> .. and once more
>
> #syz test https://android.googlesource.com/kernel/common android13-5.15-lts

I see the command but can't find the corresponding bug.
Please resend the email to syzbo...@syzkaller.appspotmail.com address
that is the sender of the bug report (also present in the Reported-by tag).

>
> --
> You received this message because you are subscribed to the Google Groups "syzkaller-android-bugs" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to syzkaller-android...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/syzkaller-android-bugs/c4efe460-d4f2-420f-9cb6-b2f9f08b6185n%40googlegroups.com.

syzbot

unread,
Nov 25, 2022, 12:39:40 PM11/25/22
to nog...@google.com, nog...@google.com, syzkaller-a...@googlegroups.com
> #syz test https://android.googlesource.com/kernel/common android13-5.15-lts

I see the command but can't find the corresponding bug.
Please resend the email to syzbo...@syzkaller.appspotmail.com address
that is the sender of the bug report (also present in the Reported-by tag).

>
> --
> You received this message because you are subscribed to the Google Groups "syzkaller-android-bugs" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to syzkaller-android...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/syzkaller-android-bugs/69ddf288-4b24-4587-824e-dff48ee32317n%40googlegroups.com.

syzbot

unread,
Feb 21, 2023, 8:08:38 PM2/21/23
to jun...@linaro.org, syzkaller-a...@googlegroups.com
This bug is marked as fixed by commit:
"ANDROID: incfs: Add check for ATTR_KILL_SUID and ATTR_MODE

But I can't find it in the tested trees[1] for more than 90 days.
Is it a correct commit? Please update it by replying:

#syz fix: exact-commit-title

Until then the bug is still considered open and new crashes with
the same signature are ignored.

Kernel: Android 5.15
Dashboard link: https://syzkaller.appspot.com/bug?extid=fcb6592762d7a9ae57f0

---
[1] I expect the commit to be present in:

1. android13-5.15-lts branch of
https://android.googlesource.com/kernel/common

syzbot

unread,
Mar 7, 2023, 8:09:34 PM3/7/23
to jun...@linaro.org, syzkaller-a...@googlegroups.com

syzbot

unread,
Mar 21, 2023, 9:10:49 PM3/21/23
to jun...@linaro.org, syzkaller-a...@googlegroups.com

syzbot

unread,
Apr 4, 2023, 9:11:34 PM4/4/23
to jun...@linaro.org, syzkaller-a...@googlegroups.com

Aleksandr Nogikh

unread,
Apr 5, 2023, 4:49:39 AM4/5/23
to syzbot, jun...@linaro.org, syzkaller-a...@googlegroups.com
#syz fix: ANDROID: incfs: Add check for ATTR_KILL_SUID and ATTR_MODE
in incfs_setattr
> --
> You received this message because you are subscribed to the Google Groups "syzkaller-android-bugs" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to syzkaller-android...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/syzkaller-android-bugs/00000000000002d8c205f88c79ea%40google.com.

syzbot

unread,
Jul 4, 2023, 4:50:46 AM7/4/23
to jun...@linaro.org, nog...@google.com, syzkaller-a...@googlegroups.com

syzbot

unread,
Jul 18, 2023, 4:50:48 AM7/18/23
to jun...@linaro.org, nog...@google.com, syzkaller-a...@googlegroups.com

syzbot

unread,
Aug 1, 2023, 4:50:51 AM8/1/23
to jun...@linaro.org, nog...@google.com, syzkaller-a...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages