general protection fault in integrity_inode_free

5 views
Skip to first unread message

syzbot

unread,
Apr 21, 2019, 7:34:05 PM4/21/19
to syzkaller...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 68d7a45e Linux 4.14.113
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1039491d200000
kernel config: https://syzkaller.appspot.com/x/.config?x=dbf1fde4d7489e1c
dashboard link: https://syzkaller.appspot.com/bug?extid=2ffda20ab420bdc14ddb
compiler: gcc (GCC) 9.0.0 20181231 (experimental)

Unfortunately, I don't have any reproducer for this crash yet.

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

call_write_iter include/linux/fs.h:1774 [inline]
new_sync_write fs/read_write.c:469 [inline]
__vfs_write+0x4ae/0x6c0 fs/read_write.c:482
kasan: CONFIG_KASAN_INLINE enabled
vfs_write+0x198/0x500 fs/read_write.c:544
SYSC_write fs/read_write.c:589 [inline]
SyS_write+0xb8/0x180 fs/read_write.c:581
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
Modules linked in:
do_syscall_64+0x1eb/0x630 arch/x86/entry/common.c:289
CPU: 0 PID: 15228 Comm: syz-executor.5 Not tainted 4.14.113 #3
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
entry_SYSCALL_64_after_hwframe+0x42/0xb7
task: ffff888060c9c6c0 task.stack: ffff888062018000
RIP: 0033:0x458c29
RIP: 0010:__rb_erase_augmented include/linux/rbtree_augmented.h:167 [inline]
RIP: 0010:rb_erase+0x29/0x1c10 lib/rbtree.c:459
RSP: 002b:00007fe1fdb91c78 EFLAGS: 00000246
RSP: 0018:ffff88806201f9d0 EFLAGS: 00010282
ORIG_RAX: 0000000000000001
RAX: dffffc0000000000 RBX: ffff88808787f8f0 RCX: ffffc9000604e000
RAX: ffffffffffffffda RBX: 00007fe1fdb91c90 RCX: 0000000000458c29
RDX: 0000000000000001 RSI: ffffffff892478c0 RDI: 0000000000000008
RDX: 0000000000000002 RSI: 00000000200000c0 RDI: 0000000000000004
RBP: ffff88806201fa18 R08: 0000000000001a5d R09: ffffffff88c866a8
RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000
R10: ffff888060c9cf68 R11: ffff888060c9c6c0 R12: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fe1fdb926d4
R13: ffff88808785f7f0 R14: 0000000000000000 R15: ffffffff867a2600
R13: 00000000004c8216 R14: 00000000004de6a8 R15: 0000000000000005
FS: 00007fe8d8d62700(0000) GS:ffff8880aee00000(0000) knlGS:0000000000000000
kobject: 'loop2' (ffff8880a49a51e0): kobject_uevent_env
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
kobject: 'loop2' (ffff8880a49a51e0): fill_kobj_path: path
= '/devices/virtual/block/loop2'
CR2: 00007efdf9ce8000 CR3: 000000009fdde000 CR4: 00000000001426f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
integrity_inode_free+0x126/0x320 security/integrity/iint.c:146
security_inode_free+0x19/0x90 security/security.c:443
__destroy_inode+0x1ef/0x4e0 fs/inode.c:237
destroy_inode+0x50/0x130 fs/inode.c:264
kobject: 'bluetooth' (ffff8880a9838600): kobject_add_internal:
parent: 'virtual', set: '(null)'
evict+0x3e9/0x630 fs/inode.c:571
iput_final fs/inode.c:1516 [inline]
iput fs/inode.c:1543 [inline]
iput+0x476/0x900 fs/inode.c:1528
swap_inode_boot_loader fs/ext4/ioctl.c:197 [inline]
ext4_ioctl+0x16bb/0x39b0 fs/ext4/ioctl.c:883
kobject: 'hci0' (ffff88805d10dfe8): kobject_add_internal:
parent: 'bluetooth', set: 'devices'
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:500 [inline]
do_vfs_ioctl+0x7b9/0x1070 fs/ioctl.c:684
SYSC_ioctl fs/ioctl.c:701 [inline]
SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692
kobject: 'hci0' (ffff88805d10dfe8): kobject_uevent_env
do_syscall_64+0x1eb/0x630 arch/x86/entry/common.c:289
kobject: 'hci0' (ffff88805d10dfe8): fill_kobj_path: path
= '/devices/virtual/bluetooth/hci0'
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x458c29
RSP: 002b:00007fe8d8d61c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 0000000000458c29
RDX: 0000000000000000 RSI: 0000000000006611 RDI: 0000000000000003
RBP: 000000000073bfa0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fe8d8d626d4
R13: 00000000004c0e5f R14: 00000000004d3410 R15: 00000000ffffffff
kobject: 'rfkill100' (ffff88809677ec28): kobject_add_internal:
parent: 'hci0', set: 'devices'
Code: 00 00 48 b8 00 00 00
kobject: 'rfkill100' (ffff88809677ec28): kobject_uevent_env
00 00 fc
kobject: 'rfkill100' (ffff88809677ec28): fill_kobj_path: path
= '/devices/virtual/bluetooth/hci0/rfkill100'
ff df 55 48 89 e5 41 57 41 56 49 89 fe 48 83 c7 08 48 89 fa 41 55 48 c1 ea
03 41 54 53 48 83 ec 20 <80> 3c 02 00 0f 85 0c 11 00 00 49 8d 7e 10 4d 8b
7e 08 48 b8 00
RIP: __rb_erase_augmented include/linux/rbtree_augmented.h:167 [inline]
RSP: ffff88806201f9d0
RIP: rb_erase+0x29/0x1c10 lib/rbtree.c:459 RSP: ffff88806201f9d0
---[ end trace fdd34455fdfd80a2 ]---


---
This bug 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 bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Sep 15, 2020, 9:56:20 AM9/15/20
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: cbfa1702 Linux 4.14.198
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=150b89b5900000
kernel config: https://syzkaller.appspot.com/x/.config?x=3990958d85b55e59
dashboard link: https://syzkaller.appspot.com/bug?extid=2ffda20ab420bdc14ddb
compiler: gcc (GCC) 10.1.0-syz 20200507
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=12c08efd900000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16ca3a2d900000

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

audit: type=1400 audit(1600178065.092:8): avc: denied { execmem } for pid=6368 comm="syz-executor605" scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=process permissive=1
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
Modules linked in:
CPU: 0 PID: 6368 Comm: syz-executor605 Not tainted 4.14.198-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
task: ffff888097864440 task.stack: ffff888097c40000
RIP: 0010:__rb_erase_augmented include/linux/rbtree_augmented.h:167 [inline]
RIP: 0010:rb_erase+0x29/0x1290 lib/rbtree.c:459
RSP: 0018:ffff888097c47a68 EFLAGS: 00010292
RAX: dffffc0000000000 RBX: ffff88808efde1f0 RCX: 1ffff11012f88f27
RDX: 0000000000000001 RSI: ffffffff8a67afa0 RDI: 0000000000000008
RBP: 0000000000000000 R08: ffffffff8a1170fc R09: 0000000000001e3c
R10: 0000000000000001 R11: ffff888097864440 R12: 0000000000000000
R13: dffffc0000000000 R14: ffff88808efe73f8 R15: ffffffff8a67afa0
FS: 000000000145c880(0000) GS:ffff8880aea00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000080 CR3: 00000000a15a0000 CR4: 00000000001406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
integrity_inode_free+0x119/0x300 security/integrity/iint.c:146
security_inode_free+0x14/0x80 security/security.c:443
__destroy_inode+0x1e8/0x4d0 fs/inode.c:238
destroy_inode+0x49/0x110 fs/inode.c:265
iput_final fs/inode.c:1524 [inline]
iput+0x458/0x7e0 fs/inode.c:1551
swap_inode_boot_loader fs/ext4/ioctl.c:197 [inline]
ext4_ioctl+0x16c5/0x3870 fs/ext4/ioctl.c:924
vfs_ioctl fs/ioctl.c:46 [inline]
file_ioctl fs/ioctl.c:500 [inline]
do_vfs_ioctl+0x75a/0xff0 fs/ioctl.c:684
SYSC_ioctl fs/ioctl.c:701 [inline]
SyS_ioctl+0x7f/0xb0 fs/ioctl.c:692
do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x46/0xbb
RIP: 0033:0x440229
RSP: 002b:00007fff8f8218a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000440229
RDX: 0000000000000000 RSI: 0000000000006611 RDI: 0000000000000003
RBP: 00000000006ca018 R08: 0000000000000000 R09: 00000000004002c8
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a30
R13: 0000000000401ac0 R14: 0000000000000000 R15: 0000000000000000
Code: ff ff 48 b8 00 00 00 00 00 fc ff df 41 57 49 89 f7 41 56 41 55 41 54 49 89 fc 48 83 c7 08 48 89 fa 55 48 c1 ea 03 53 48 83 ec 18 <80> 3c 02 00 0f 85 f2 0c 00 00 49 8d 7c 24 10 4d 8b 74 24 08 48
RIP: __rb_erase_augmented include/linux/rbtree_augmented.h:167 [inline] RSP: ffff888097c47a68
RIP: rb_erase+0x29/0x1290 lib/rbtree.c:459 RSP: ffff888097c47a68
---[ end trace 76a5eb4b516d26e1 ]---

Reply all
Reply to author
Forward
0 new messages