Hello,
syzbot found the following issue on:
HEAD commit: 5b673be0c6b0 FROMGIT: USB: gadget: bRequestType is a bitfi..
git tree: android12-5.4
console output:
https://syzkaller.appspot.com/x/log.txt?x=160ad1edb00000
kernel config:
https://syzkaller.appspot.com/x/.config?x=8844969a6709ae53
dashboard link:
https://syzkaller.appspot.com/bug?extid=02b637bea12b3944b0b9
compiler: Debian clang version 11.0.1-2, GNU ld (GNU Binutils for Debian) 2.35.2
Unfortunately, I don't have any reproducer for this issue yet.
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+02b637...@syzkaller.appspotmail.com
==================================================================
BUG: KASAN: slab-out-of-bounds in legacy_parse_param+0x4c1/0x720 fs/fs_context.c:603
Write of size 1 at addr ffff8881ee785000 by task syz-executor.5/31224
CPU: 0 PID: 31224 Comm: syz-executor.5 Not tainted 5.4.147-syzkaller-00015-g5b673be0c6b0 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x18e/0x1de lib/dump_stack.c:118
print_address_description+0x9b/0x650 mm/kasan/report.c:384
__kasan_report+0x182/0x260 mm/kasan/report.c:516
kasan_report+0x30/0x60 mm/kasan/common.c:653
check_memory_region_inline mm/kasan/generic.c:141 [inline]
check_memory_region+0x2a5/0x2e0 mm/kasan/generic.c:191
memcpy+0x38/0x50 mm/kasan/common.c:124
legacy_parse_param+0x4c1/0x720 fs/fs_context.c:603
vfs_parse_fs_param+0x20f/0x430 fs/fs_context.c:145
vfs_fsconfig_locked fs/fsopen.c:265 [inline]
__do_sys_fsconfig fs/fsopen.c:445 [inline]
__se_sys_fsconfig+0xc6b/0xf40 fs/fsopen.c:314
do_syscall_64+0xcb/0x1e0 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x7f9259b05e99
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f9258c5b168 EFLAGS: 00000246 ORIG_RAX: 00000000000001af
RAX: ffffffffffffffda RBX: 00007f9259c19030 RCX: 00007f9259b05e99
RDX: 0000000020000100 RSI: 0000000000000001 RDI: 0000000000000003
RBP: 00007f9259b5fff1 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000020000140 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fff403b9f7f R14: 00007f9258c5b300 R15: 0000000000022000
Allocated by task 31223:
save_stack mm/kasan/common.c:70 [inline]
set_track mm/kasan/common.c:78 [inline]
__kasan_kmalloc+0x137/0x1e0 mm/kasan/common.c:529
kmem_cache_alloc_trace+0x139/0x2b0 mm/slub.c:2849
kmalloc include/linux/slab.h:556 [inline]
legacy_parse_param+0x421/0x720 fs/fs_context.c:596
vfs_parse_fs_param+0x20f/0x430 fs/fs_context.c:145
vfs_fsconfig_locked fs/fsopen.c:265 [inline]
__do_sys_fsconfig fs/fsopen.c:445 [inline]
__se_sys_fsconfig+0xc6b/0xf40 fs/fsopen.c:314
do_syscall_64+0xcb/0x1e0 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x44/0xa9
Freed by task 28036:
save_stack mm/kasan/common.c:70 [inline]
set_track mm/kasan/common.c:78 [inline]
kasan_set_free_info mm/kasan/common.c:345 [inline]
__kasan_slab_free+0x18a/0x240 mm/kasan/common.c:487
slab_free_hook mm/slub.c:1455 [inline]
slab_free_freelist_hook+0x7b/0x150 mm/slub.c:1493
slab_free mm/slub.c:3073 [inline]
kfree+0xe0/0x660 mm/slub.c:4064
skb_release_all net/core/skbuff.c:675 [inline]
__kfree_skb+0x55/0x170 net/core/skbuff.c:689
skb_free_datagram+0x24/0xd0 net/core/datagram.c:329
netlink_recvmsg+0x5ce/0x1060 net/netlink/af_netlink.c:1999
sock_recvmsg_nosec net/socket.c:872 [inline]
sock_recvmsg net/socket.c:890 [inline]
__sys_recvfrom+0x31d/0x490 net/socket.c:1999
__do_sys_recvfrom net/socket.c:2017 [inline]
__se_sys_recvfrom net/socket.c:2013 [inline]
__x64_sys_recvfrom+0xda/0xf0 net/socket.c:2013
do_syscall_64+0xcb/0x1e0 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x44/0xa9
The buggy address belongs to the object at ffff8881ee784000
which belongs to the cache kmalloc-4k of size 4096
The buggy address is located 0 bytes to the right of
4096-byte region [ffff8881ee784000, ffff8881ee785000)
The buggy address belongs to the page:
page:ffffea0007b9e000 refcount:1 mapcount:0 mapping:ffff8881f5c0c280 index:0x0 compound_mapcount: 0
flags: 0x8000000000010200(slab|head)
raw: 8000000000010200 0000000000000000 0000000100000001 ffff8881f5c0c280
raw: 0000000000000000 0000000080040004 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC)
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook mm/page_alloc.c:2165 [inline]
prep_new_page+0x19a/0x380 mm/page_alloc.c:2171
get_page_from_freelist+0x550/0x8b0 mm/page_alloc.c:3794
__alloc_pages_nodemask+0x2d6/0x740 mm/page_alloc.c:4855
alloc_slab_page+0x39/0x3e0 mm/slub.c:343
allocate_slab mm/slub.c:1676 [inline]
new_slab+0x97/0x460 mm/slub.c:1742
new_slab_objects mm/slub.c:2499 [inline]
___slab_alloc+0x330/0x4c0 mm/slub.c:2660
__slab_alloc mm/slub.c:2700 [inline]
slab_alloc_node mm/slub.c:2785 [inline]
slab_alloc mm/slub.c:2830 [inline]
kmem_cache_alloc_trace+0x199/0x2b0 mm/slub.c:2847
kmalloc include/linux/slab.h:556 [inline]
kzalloc include/linux/slab.h:690 [inline]
snmp6_alloc_dev net/ipv6/addrconf.c:350 [inline]
ipv6_add_dev+0x4d1/0x1480 net/ipv6/addrconf.c:399
addrconf_notify+0x57a/0x38d0 net/ipv6/addrconf.c:3524
notifier_call_chain kernel/notifier.c:98 [inline]
__raw_notifier_call_chain kernel/notifier.c:399 [inline]
raw_notifier_call_chain+0x9e/0x110 kernel/notifier.c:406
call_netdevice_notifiers_info net/core/dev.c:1670 [inline]
call_netdevice_notifiers_extack net/core/dev.c:1682 [inline]
call_netdevice_notifiers net/core/dev.c:1696 [inline]
register_netdevice+0xdc8/0x12f0 net/core/dev.c:9196
register_netdev+0x37/0x50 net/core/dev.c:9294
sit_init_net+0x225/0x460 net/ipv6/sit.c:1866
ops_init+0x26e/0x340 net/core/net_namespace.c:137
__register_pernet_operations net/core/net_namespace.c:1146 [inline]
register_pernet_operations+0x25c/0x8e0 net/core/net_namespace.c:1223
register_pernet_device+0x2f/0x80 net/core/net_namespace.c:1310
page_owner free stack trace missing
Memory state around the buggy address:
ffff8881ee784f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff8881ee784f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff8881ee785000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff8881ee785080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff8881ee785100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
---
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.