netlink: 4 bytes leftover after parsing attributes in process `syz-executor.5'. netlink: 12 bytes leftover after parsing attributes in process `syz-executor.5'. ================================================================== BUG: KASAN: slab-out-of-bounds in __lock_acquire+0x2cb4/0x3ff0 kernel/locking/lockdep.c:3295 Read of size 8 at addr ffff888235a0b210 by task syz-executor.5/6739 CPU: 0 PID: 6739 Comm: syz-executor.5 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/21/2023 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256 kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354 kasan_report mm/kasan/report.c:412 [inline] __asan_report_load8_noabort+0x88/0x90 mm/kasan/report.c:433 __lock_acquire+0x2cb4/0x3ff0 kernel/locking/lockdep.c:3295 lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3908 __mutex_lock_common kernel/locking/mutex.c:937 [inline] __mutex_lock+0xd7/0x1190 kernel/locking/mutex.c:1078 xt_find_match net/netfilter/x_tables.c:189 [inline] xt_find_match+0xa3/0x280 net/netfilter/x_tables.c:181 xt_request_find_match net/netfilter/x_tables.c:219 [inline] xt_request_find_match+0x88/0x110 net/netfilter/x_tables.c:212 get_xt_match net/sched/em_ipt.c:112 [inline] em_ipt_change+0x1c7/0x470 net/sched/em_ipt.c:132 tcf_em_validate net/sched/ematch.c:248 [inline] tcf_em_tree_validate net/sched/ematch.c:365 [inline] tcf_em_tree_validate+0x8fa/0xea0 net/sched/ematch.c:307 basic_set_parms net/sched/cls_basic.c:155 [inline] basic_change+0x1173/0x1260 net/sched/cls_basic.c:212 tc_new_tfilter+0xb52/0x16c0 net/sched/cls_api.c:1320 rtnetlink_rcv_msg+0x453/0xb80 net/core/rtnetlink.c:4782 netlink_rcv_skb+0x160/0x440 net/netlink/af_netlink.c:2463 netlink_unicast_kernel net/netlink/af_netlink.c:1325 [inline] netlink_unicast+0x4d5/0x690 net/netlink/af_netlink.c:1351 netlink_sendmsg+0x6c3/0xc50 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xc3/0x120 net/socket.c:661 ___sys_sendmsg+0x7bb/0x8e0 net/socket.c:2227 __sys_sendmsg net/socket.c:2265 [inline] __do_sys_sendmsg net/socket.c:2274 [inline] __se_sys_sendmsg net/socket.c:2272 [inline] __x64_sys_sendmsg+0x132/0x220 net/socket.c:2272 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f98998190f9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 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 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f9897d8b168 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f9899938f80 RCX: 00007f98998190f9 RDX: 0000000000000000 RSI: 00000000200001c0 RDI: 0000000000000004 RBP: 00007f9899874ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffd79daa76f R14: 00007f9897d8b300 R15: 0000000000022000 Allocated by task 1: __do_kmalloc mm/slab.c:3727 [inline] __kmalloc+0x15a/0x3c0 mm/slab.c:3736 kmalloc include/linux/slab.h:520 [inline] kzalloc include/linux/slab.h:709 [inline] __register_sysctl_table+0x112/0x1090 fs/proc/proc_sysctl.c:1310 neigh_sysctl_register+0x341/0x680 net/core/neighbour.c:3260 devinet_sysctl_register+0xb1/0x230 net/ipv4/devinet.c:2381 inetdev_init+0x223/0x4a0 net/ipv4/devinet.c:269 inetdev_event+0x9cf/0x1270 net/ipv4/devinet.c:1477 notifier_call_chain+0xc0/0x230 kernel/notifier.c:93 call_netdevice_notifiers net/core/dev.c:1762 [inline] register_netdevice+0xdd2/0x10f0 net/core/dev.c:8761 __ip_tunnel_create+0x398/0x580 net/ipv4/ip_tunnel.c:280 ip_tunnel_init_net+0x330/0x990 net/ipv4/ip_tunnel.c:1035 ops_init+0xb3/0x410 net/core/net_namespace.c:129 __register_pernet_operations net/core/net_namespace.c:957 [inline] register_pernet_operations+0x32f/0x790 net/core/net_namespace.c:1028 register_pernet_device+0x26/0x70 net/core/net_namespace.c:1115 ipgre_init+0x45/0x19f net/ipv4/ip_gre.c:1780 do_one_initcall+0xf1/0x740 init/main.c:884 do_initcall_level init/main.c:952 [inline] do_initcalls init/main.c:960 [inline] do_basic_setup init/main.c:978 [inline] kernel_init_freeable+0x9c5/0xab7 init/main.c:1145 kernel_init+0xd/0x1ba init/main.c:1062 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 Freed by task 0: (stack is not available) The buggy address belongs to the object at ffff888235a0adc0 which belongs to the cache kmalloc-1024 of size 1024 The buggy address is located 80 bytes to the right of 1024-byte region [ffff888235a0adc0, ffff888235a0b1c0) The buggy address belongs to the page: page:ffffea0008d68280 count:1 mapcount:0 mapping:ffff88813bff0ac0 index:0xffff888235a0b240 compound_mapcount: 0 flags: 0x57ff00000008100(slab|head) raw: 057ff00000008100 ffffea0008d69d88 ffffea0008e37988 ffff88813bff0ac0 raw: ffff888235a0b240 ffff888235a0a040 0000000100000006 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888235a0b100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888235a0b180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888235a0b200: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ^ ffff888235a0b280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888235a0b300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================