syzbot


KASAN: invalid-free in kobject_uevent_env

Status: auto-closed as invalid on 2019/02/22 10:09
Subsystems: net
[Documentation on labels]
Reported-by: syzbot+b95e446856ed437d193c@syzkaller.appspotmail.com
First crash: 2211d, last: 2211d

Sample crash report:
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
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/04/05 15:06 upstream 3e968c9f1401 5e1ccffc .config console log report ci-upstream-kasan-gce
* Struck through repros no longer work on HEAD.