KASAN: invalid-free in kobject_uevent_env

12 views
Skip to first unread message

syzbot

unread,
Apr 5, 2018, 1:02:02 PM4/5/18
to syzkaller-upst...@googlegroups.com
Hello,

syzbot hit the following crash on upstream commit
3e968c9f1401088abc9a19ae6ff571644d37a355 (Wed Apr 4 21:19:24 2018 +0000)
Merge tag 'ext4_for_linus' of
git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
syzbot dashboard link:
https://syzkaller.appspot.com/bug?extid=b95e446856ed437d193c

Unfortunately, I don't have any reproducer for this crash yet.
Raw console output:
https://syzkaller.appspot.com/x/log.txt?id=5098405814599680
Kernel config:
https://syzkaller.appspot.com/x/.config?id=9118669095563550941
compiler: gcc (GCC) 7.1.1 20170620
CC: [adob...@gmail.com arvind....@gmail.com da...@davemloft.net
de...@googlers.com edum...@google.com f.fai...@gmail.com f...@strlen.de
j...@perches.com ktk...@virtuozzo.com linux-...@vger.kernel.org
net...@vger.kernel.org ro...@cumulusnetworks.com ste...@networkplumber.org
xiyou.w...@gmail.com]

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+b95e44...@syzkaller.appspotmail.com
It will help syzbot understand when the bug is fixed. See footer for
details.
If you forward the report, please keep this part and the footer.

netlink: 8 bytes leftover after parsing attributes in process
`syz-executor2'.
netlink: 8 bytes leftover after parsing attributes in process
`syz-executor2'.
==================================================================
BUG: KASAN: double-free or invalid-free in kobject_uevent_env+0x252/0xd30
lib/kobject_uevent.c:552

CPU: 1 PID: 18506 Comm: syz-executor1 Not tainted 4.16.0+ #380
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x1a7/0x27d lib/dump_stack.c:53
print_address_description+0x73/0x250 mm/kasan/report.c:256
kasan_report_invalid_free+0x55/0x80 mm/kasan/report.c:336
__kasan_slab_free+0x145/0x170 mm/kasan/kasan.c:500
kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:527
__cache_free mm/slab.c:3486 [inline]
kfree+0xd9/0x260 mm/slab.c:3801
kobject_uevent_env+0x252/0xd30 lib/kobject_uevent.c:552
kobject_uevent+0x1f/0x30 lib/kobject_uevent.c:568
kobject_cleanup lib/kobject.c:633 [inline]
kobject_release lib/kobject.c:675 [inline]
kref_put include/linux/kref.h:70 [inline]
kobject_put+0x1c2/0x250 lib/kobject.c:692
net_rx_queue_update_kobjects+0x3d1/0x590 net/core/net-sysfs.c:968
remove_queue_kobjects net/core/net-sysfs.c:1424 [inline]
netdev_unregister_kobject+0x1d5/0x2c0 net/core/net-sysfs.c:1566
rollback_registered_many+0x7fb/0xe20 net/core/dev.c:7460
rollback_registered+0x1be/0x3c0 net/core/dev.c:7478
unregister_netdevice_queue+0x2e3/0x5f0 net/core/dev.c:8520
br_dev_delete+0x138/0x190 net/bridge/br_if.c:320
br_del_bridge+0xac/0xe0 net/bridge/br_if.c:421
br_ioctl_deviceless_stub+0x2ec/0xa00 net/bridge/br_ioctl.c:380
sock_ioctl+0x321/0x670 net/socket.c:1048
vfs_ioctl fs/ioctl.c:46 [inline]
do_vfs_ioctl+0x1b1/0x1520 fs/ioctl.c:686
ksys_ioctl+0x94/0xb0 fs/ioctl.c:701
SYSC_ioctl fs/ioctl.c:708 [inline]
SyS_ioctl+0x24/0x30 fs/ioctl.c:706
do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x4552d9
RSP: 002b:00007f6d7f6b1c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f6d7f6b26d4 RCX: 00000000004552d9
RDX: 0000000020000000 RSI: 00000000000089a1 RDI: 0000000000000014
RBP: 000000000072bea0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff
R13: 0000000000000364 R14: 00000000006f8200 R15: 0000000000000000

Allocated by task 0:
(stack is not available)

Freed by task 0:
(stack is not available)

The buggy address belongs to the object at ffff8801ce8663c0
which belongs to the cache kmalloc-4096 of size 4096
The buggy address is located 1344 bytes inside of
4096-byte region [ffff8801ce8663c0, ffff8801ce8673c0)
The buggy address belongs to the page:
page:ffffea00073a1980 count:1 mapcount:0 mapping:ffff8801ce8663c0 index:0x0
compound_mapcount: 0
flags: 0x2fffc0000008100(slab|head)
raw: 02fffc0000008100 ffff8801ce8663c0 0000000000000000 0000000100000001
raw: ffffea0006bfdda0 ffffea0007387fa0 ffff8801dac00dc0 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
ffff8801ce866800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8801ce866880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
> ffff8801ce866900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
^
ffff8801ce866980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff8801ce866a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================


---
This bug is generated by a dumb bot. It may contain errors.
See https://goo.gl/tpsmEJ for details.
Direct all questions to syzk...@googlegroups.com.

syzbot will keep track of this bug report.
If you forgot to add the Reported-by tag, once the fix for this bug is
merged
into any tree, please reply to this email with:
#syz fix: exact-commit-title
To mark this as a duplicate of another syzbot report, please reply with:
#syz dup: exact-subject-of-another-report
If it's a one-off invalid bug report, please reply with:
#syz invalid
Note: if the crash happens again, it will cause creation of a new bug
report.
Note: all commands must start from beginning of the line in the email body.
To upstream this report, please reply with:
#syz upstream

syzbot

unread,
Feb 22, 2019, 5:09:05 AM2/22/19
to syzkaller-upst...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages