================================================================== BUG: KASAN: slab-out-of-bounds in br_mrp_parse+0x277/0x3a0 net/bridge/br_mrp_netlink.c:30 Read of size 4 at addr ffff888092996f5c by task syz-executor.0/8584 CPU: 0 PID: 8584 Comm: syz-executor.0 Not tainted 5.7.0-rc2-syzkaller #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+0x128/0x182 lib/dump_stack.c:118 print_address_description.constprop.8.cold.10+0x9/0x317 mm/kasan/report.c:382 __kasan_report.cold.11+0x35/0x4d mm/kasan/report.c:511 kasan_report+0x32/0x50 mm/kasan/common.c:625 br_mrp_parse+0x277/0x3a0 net/bridge/br_mrp_netlink.c:30 br_afspec+0x316/0x3d0 net/bridge/br_netlink.c:676 br_setlink+0x33c/0x4c0 net/bridge/br_netlink.c:933 rtnl_bridge_setlink+0x214/0x6e0 net/core/rtnetlink.c:4803 rtnetlink_rcv_msg+0x346/0x8c0 net/core/rtnetlink.c:5461 netlink_rcv_skb+0x119/0x340 net/netlink/af_netlink.c:2469 netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline] netlink_unicast+0x434/0x630 net/netlink/af_netlink.c:1329 netlink_sendmsg+0x714/0xc60 net/netlink/af_netlink.c:1918 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xac/0xe0 net/socket.c:672 ____sys_sendmsg+0x554/0x760 net/socket.c:2362 ___sys_sendmsg+0xe4/0x160 net/socket.c:2416 __sys_sendmsg+0xce/0x170 net/socket.c:2449 do_syscall_64+0xc6/0x620 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 RIP: 0033:0x45ca29 Code: 0d b7 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 db b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f3602a0ac78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 0000000000500d80 RCX: 000000000045ca29 RDX: 0000000000000000 RSI: 0000000020000240 RDI: 0000000000000003 RBP: 000000000078bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000009fd R14: 00000000004ccd59 R15: 00007f3602a0b6d4 Allocated by task 7340: save_stack+0x19/0x40 mm/kasan/common.c:49 set_track mm/kasan/common.c:57 [inline] __kasan_kmalloc.constprop.17+0xc1/0xd0 mm/kasan/common.c:495 kvmalloc include/linux/mm.h:757 [inline] kvzalloc include/linux/mm.h:765 [inline] alloc_netdev_mqs+0x5a/0xd00 net/core/dev.c:9821 rtnl_create_link+0x1e5/0xb60 net/core/rtnetlink.c:3068 __rtnl_newlink+0xb22/0x1250 net/core/rtnetlink.c:3330 rtnl_newlink+0x5c/0x80 net/core/rtnetlink.c:3398 rtnetlink_rcv_msg+0x346/0x8c0 net/core/rtnetlink.c:5461 netlink_rcv_skb+0x119/0x340 net/netlink/af_netlink.c:2469 netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline] netlink_unicast+0x434/0x630 net/netlink/af_netlink.c:1329 netlink_sendmsg+0x714/0xc60 net/netlink/af_netlink.c:1918 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xac/0xe0 net/socket.c:672 __sys_sendto+0x1d9/0x2b0 net/socket.c:2000 __do_sys_sendto net/socket.c:2012 [inline] __se_sys_sendto net/socket.c:2008 [inline] __x64_sys_sendto+0xd8/0x1b0 net/socket.c:2008 do_syscall_64+0xc6/0x620 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 Freed by task 1: save_stack+0x19/0x40 mm/kasan/common.c:49 set_track mm/kasan/common.c:57 [inline] kasan_set_free_info mm/kasan/common.c:317 [inline] __kasan_slab_free+0xf7/0x140 mm/kasan/common.c:456 __cache_free mm/slab.c:3426 [inline] kfree+0x107/0x2b0 mm/slab.c:3757 tomoyo_realpath_from_path+0x145/0x670 security/tomoyo/realpath.c:289 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path_perm+0x1fa/0x370 security/tomoyo/file.c:822 security_inode_getattr+0xab/0x100 security/security.c:1273 vfs_getattr+0x17/0x40 fs/stat.c:117 vfs_statx+0xcb/0x130 fs/stat.c:201 vfs_lstat include/linux/fs.h:3284 [inline] __do_sys_newlstat+0x77/0xd0 fs/stat.c:364 do_syscall_64+0xc6/0x620 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 The buggy address belongs to the object at ffff888092996000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 3932 bytes inside of 4096-byte region [ffff888092996000, ffff888092997000) The buggy address belongs to the page: page:ffffea00024a6580 refcount:1 mapcount:0 mapping:00000000e0c12e3c index:0x0 head:ffffea00024a6580 order:1 compound_mapcount:0 flags: 0xfffe0000010200(slab|head) raw: 00fffe0000010200 ffffea00027dba08 ffffea00024a2688 ffff8880aa402000 raw: 0000000000000000 ffff888092996000 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888092996e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888092996e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888092996f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888092996f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888092997000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================