bisecting cause commit starting from 0c0ddd6ae47c9238c18f475bcca675ca74c9dc31 building syzkaller on 2c36e7a75f8689b3da20e1a81a2ee5391f3af6e5 testing commit 0c0ddd6ae47c9238c18f475bcca675ca74c9dc31 with gcc (GCC) 8.1.0 kernel signature: 5e70932707c64d076978b74abead7d95c796795a0ccd7fa5b0922d35b347cf21 all runs: crashed: BUG: unable to handle kernel paging request in ethnl_update_bitset32 testing release v5.5 testing commit d5226fa6dbae0569ee43ecfc08bdcd6770fc4755 with gcc (GCC) 8.1.0 kernel signature: 1cf7b44cea7b66b36d64e57fc1c2cb3ae3f8f3f396bcde0c4721470e68c399c0 all runs: OK # git bisect start 0c0ddd6ae47c9238c18f475bcca675ca74c9dc31 d5226fa6dbae0569ee43ecfc08bdcd6770fc4755 Bisecting: 6622 revisions left to test after this (roughly 13 steps) [4cadc60d6bcfee9c626d4b55e9dc1475d21ad3bb] Merge tag 'for-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply testing commit 4cadc60d6bcfee9c626d4b55e9dc1475d21ad3bb with gcc (GCC) 8.1.0 kernel signature: 5416d3793423a751a0ed88c3a472675ac263cc768560f392058f0d5664445e0b all runs: crashed: BUG: unable to handle kernel paging request in ethnl_update_bitset32 # git bisect bad 4cadc60d6bcfee9c626d4b55e9dc1475d21ad3bb Bisecting: 2314 revisions left to test after this (roughly 12 steps) [bd2463ac7d7ec51d432f23bf0e893fb371a908cd] Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next testing commit bd2463ac7d7ec51d432f23bf0e893fb371a908cd with gcc (GCC) 8.1.0 kernel signature: 552c21d54a9d0f575a781c392417c3ddaa37d1f576e555cf546a93952f07050a all runs: crashed: BUG: unable to handle kernel paging request in ethnl_update_bitset32 # git bisect bad bd2463ac7d7ec51d432f23bf0e893fb371a908cd Bisecting: 1616 revisions left to test after this (roughly 11 steps) [6bc82d9b7e6371673992ed5e3897cf7fb8cc4f41] qed: rt init valid initialization changed testing commit 6bc82d9b7e6371673992ed5e3897cf7fb8cc4f41 with gcc (GCC) 8.1.0 kernel signature: 6a6b559a60af3b361912718184d20eed7840618a672a5d7b2f891d10a5ad7385 all runs: crashed: BUG: unable to handle kernel paging request in ethnl_update_bitset32 # git bisect bad 6bc82d9b7e6371673992ed5e3897cf7fb8cc4f41 Bisecting: 808 revisions left to test after this (roughly 10 steps) [b9ae51273655a72a12fba730843fd72fb132735a] hsr: fix dummy hsr_debugfs_rename() declaration testing commit b9ae51273655a72a12fba730843fd72fb132735a with gcc (GCC) 8.1.0 kernel signature: 2ae6bb126158aebfea5640722f79718ff2fef4a1c32d87cdb7b53d17f9d14908 all runs: crashed: BUG: unable to handle kernel paging request in ethnl_update_bitset32 # git bisect bad b9ae51273655a72a12fba730843fd72fb132735a Bisecting: 403 revisions left to test after this (roughly 9 steps) [dacad7b34b59fb06a242ef2cf64205f04f7c5339] mlxsw: spectrum_router: Start using new IPv6 route notifications testing commit dacad7b34b59fb06a242ef2cf64205f04f7c5339 with gcc (GCC) 8.1.0 kernel signature: dfbde4cc3e6a63a46bf21fc2894441b1ee0a0d01a059f62610cea7c68d4ce048 all runs: OK # git bisect good dacad7b34b59fb06a242ef2cf64205f04f7c5339 Bisecting: 201 revisions left to test after this (roughly 8 steps) [f685e609a301f171b62ee52a69acc3a74c2c04aa] net: dsa: Deny PTP on master if switch supports it testing commit f685e609a301f171b62ee52a69acc3a74c2c04aa with gcc (GCC) 8.1.0 kernel signature: 3fc0a5d1b3c3c6b2b9c348ef84adc4984795d4fd4ff1738ac82cab971638b145 all runs: crashed: BUG: unable to handle kernel paging request in ethnl_update_bitset32 # git bisect bad f685e609a301f171b62ee52a69acc3a74c2c04aa Bisecting: 100 revisions left to test after this (roughly 7 steps) [4bc188c7f23a5a308d7f15dda1b6a286d74e8954] xdp: Simplify cpumap cleanup testing commit 4bc188c7f23a5a308d7f15dda1b6a286d74e8954 with gcc (GCC) 8.1.0 kernel signature: 8dc494eafc5b61536426a03d305e0725c949759ebf969f30e7ae368f30d91f34 all runs: OK # git bisect good 4bc188c7f23a5a308d7f15dda1b6a286d74e8954 Bisecting: 61 revisions left to test after this (roughly 6 steps) [7c8dce4b166113743adad131b5a24c4acc12f92c] bpftool: Make skeleton C code compilable with C++ compiler testing commit 7c8dce4b166113743adad131b5a24c4acc12f92c with gcc (GCC) 8.1.0 kernel signature: bf6639c0f6dbd12d0bed848bfd7c6d1eb3dbce484a09a98546079b07aa8453a0 all runs: OK # git bisect good 7c8dce4b166113743adad131b5a24c4acc12f92c Bisecting: 30 revisions left to test after this (roughly 5 steps) [8ca8559ff3cefd78e12b9658f21cc8bcc02407ec] s390/qeth: remove QETH_RX_PULL_LEN testing commit 8ca8559ff3cefd78e12b9658f21cc8bcc02407ec with gcc (GCC) 8.1.0 kernel signature: e7c6268cdde7dbadab737c913cf8d83b97e4f29101e68bfff54d09026cec9e7e all runs: OK # git bisect good 8ca8559ff3cefd78e12b9658f21cc8bcc02407ec Bisecting: 15 revisions left to test after this (roughly 4 steps) [041b1c5d4a53e97fc9e029ae32469552ca12cb9b] ethtool: helper functions for netlink interface testing commit 041b1c5d4a53e97fc9e029ae32469552ca12cb9b with gcc (GCC) 8.1.0 kernel signature: 58405ab03b3444a0323510d8a2c873d61dd5049982c9fe17fdb36b414710cf12 all runs: OK # git bisect good 041b1c5d4a53e97fc9e029ae32469552ca12cb9b Bisecting: 7 revisions left to test after this (roughly 3 steps) [73286734c1b0d009fd317c2a74e173cb22233dad] ethtool: add LINKINFO_NTF notification testing commit 73286734c1b0d009fd317c2a74e173cb22233dad with gcc (GCC) 8.1.0 kernel signature: 552d45bc0f5f9af7397868492a186b95a0ab00358d8a45fd5eb1f78520dea958 all runs: OK # git bisect good 73286734c1b0d009fd317c2a74e173cb22233dad Bisecting: 3 revisions left to test after this (roughly 2 steps) [3d2b847fb99cf2b28aa046e486636e555bc6ed1c] ethtool: provide link state with LINKSTATE_GET request testing commit 3d2b847fb99cf2b28aa046e486636e555bc6ed1c with gcc (GCC) 8.1.0 kernel signature: 33d7355fc5a39e171af2e8504582007b242bf2a1f502ab54eb349a0e923ee46c all runs: crashed: BUG: unable to handle kernel paging request in ethnl_update_bitset32 # git bisect bad 3d2b847fb99cf2b28aa046e486636e555bc6ed1c Bisecting: 1 revision left to test after this (roughly 1 step) [bfbcfe2032e70bd8598d680d39ac177d507e39ac] ethtool: set link modes related data with LINKMODES_SET request testing commit bfbcfe2032e70bd8598d680d39ac177d507e39ac with gcc (GCC) 8.1.0 kernel signature: f6f918443618d0a636b52ad8b6049124dc721c123abdb6a07f84b4a21953c0d2 run #0: crashed: BUG: unable to handle kernel paging request in ethnl_update_bitset32 run #1: crashed: BUG: unable to handle kernel paging request in ethnl_update_bitset32 run #2: crashed: BUG: unable to handle kernel paging request in ethnl_update_bitset32 run #3: crashed: BUG: unable to handle kernel paging request in ethnl_update_bitset32 run #4: crashed: BUG: unable to handle kernel paging request in ethnl_update_bitset32 run #5: crashed: BUG: unable to handle kernel paging request in ethnl_update_bitset32 run #6: crashed: BUG: unable to handle kernel paging request in ethnl_update_bitset32 run #7: crashed: BUG: unable to handle kernel paging request in ethnl_update_bitset32 run #8: crashed: BUG: unable to handle kernel paging request in ethnl_update_bitset32 run #9: crashed: KASAN: use-after-free Read in ethnl_update_bitset32 # git bisect bad bfbcfe2032e70bd8598d680d39ac177d507e39ac Bisecting: 0 revisions left to test after this (roughly 0 steps) [f625aa9be8c10f2e4dc677837e240730a25feda7] ethtool: provide link mode information with LINKMODES_GET request testing commit f625aa9be8c10f2e4dc677837e240730a25feda7 with gcc (GCC) 8.1.0 kernel signature: 868735c74f60035525ce6b7fead4222c79de592e7dffbd5513ff2fcbacc26fdc all runs: OK # git bisect good f625aa9be8c10f2e4dc677837e240730a25feda7 bfbcfe2032e70bd8598d680d39ac177d507e39ac is the first bad commit commit bfbcfe2032e70bd8598d680d39ac177d507e39ac Author: Michal Kubecek Date: Fri Dec 27 15:56:13 2019 +0100 ethtool: set link modes related data with LINKMODES_SET request Implement LINKMODES_SET netlink request to set advertised linkmodes and related attributes as ETHTOOL_SLINKSETTINGS and ETHTOOL_SSET commands do. The request allows setting autonegotiation flag, speed, duplex and advertised link modes. Signed-off-by: Michal Kubecek Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller Documentation/networking/ethtool-netlink.rst | 27 +++ include/uapi/linux/ethtool_netlink.h | 1 + net/ethtool/linkmodes.c | 235 +++++++++++++++++++++++++++ net/ethtool/netlink.c | 5 + net/ethtool/netlink.h | 1 + 5 files changed, 269 insertions(+) culprit signature: f6f918443618d0a636b52ad8b6049124dc721c123abdb6a07f84b4a21953c0d2 parent signature: 868735c74f60035525ce6b7fead4222c79de592e7dffbd5513ff2fcbacc26fdc revisions tested: 16, total time: 3h41m42.587341728s (build: 1h39m37.571969537s, test: 2h1m8.584899599s) first bad commit: bfbcfe2032e70bd8598d680d39ac177d507e39ac ethtool: set link modes related data with LINKMODES_SET request cc: ["davem@davemloft.net" "f.fainelli@gmail.com" "mkubecek@suse.cz"] crash: KASAN: use-after-free Read in ethnl_update_bitset32 ================================================================== BUG: KASAN: use-after-free in ethnl_bitmap32_not_zero net/ethtool/bitset.c:112 [inline] BUG: KASAN: use-after-free in ethnl_compact_sanity_checks net/ethtool/bitset.c:526 [inline] BUG: KASAN: use-after-free in ethnl_update_bitset32.part.5+0x7c7/0x1830 net/ethtool/bitset.c:569 Read of size 4 at addr ffff8880a8bf243c by task syz-executor.2/8662 CPU: 0 PID: 8662 Comm: syz-executor.2 Not tainted 5.5.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+0x12d/0x187 lib/dump_stack.c:118 print_address_description.constprop.8.cold.10+0x9/0x31d mm/kasan/report.c:374 __kasan_report.cold.11+0x1b/0x3a mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:639 __asan_report_load4_noabort+0x14/0x20 mm/kasan/generic_report.c:134 ethnl_bitmap32_not_zero net/ethtool/bitset.c:112 [inline] ethnl_compact_sanity_checks net/ethtool/bitset.c:526 [inline] ethnl_update_bitset32.part.5+0x7c7/0x1830 net/ethtool/bitset.c:569 ethnl_update_bitset32 net/ethtool/bitset.c:730 [inline] ethnl_update_bitset+0xe/0x13 net/ethtool/bitset.c:731 ethnl_update_linkmodes net/ethtool/linkmodes.c:303 [inline] ethnl_set_linkmodes+0x3b8/0xae0 net/ethtool/linkmodes.c:359 genl_family_rcv_msg_doit net/netlink/genetlink.c:672 [inline] genl_family_rcv_msg net/netlink/genetlink.c:717 [inline] genl_rcv_msg+0x5d9/0x10e0 net/netlink/genetlink.c:734 netlink_rcv_skb+0x13c/0x380 net/netlink/af_netlink.c:2477 genl_rcv+0x23/0x40 net/netlink/genetlink.c:745 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x45e/0x6a0 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x7b0/0xcb0 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:643 [inline] sock_sendmsg+0xb5/0xf0 net/socket.c:663 ____sys_sendmsg+0x603/0x950 net/socket.c:2342 ___sys_sendmsg+0xe4/0x160 net/socket.c:2396 __sys_sendmsg+0xd9/0x180 net/socket.c:2429 __do_sys_sendmsg net/socket.c:2438 [inline] __se_sys_sendmsg net/socket.c:2436 [inline] __x64_sys_sendmsg+0x73/0xb0 net/socket.c:2436 do_syscall_64+0xca/0x5f0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45c429 Code: ad b6 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 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f7b68546c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f7b685476d4 RCX: 000000000045c429 RDX: 0000000000000000 RSI: 0000000020000240 RDI: 0000000000000003 RBP: 000000000076bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000904 R14: 00000000004d4f90 R15: 000000000076bf2c Allocated by task 8623: save_stack+0x21/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] __kasan_kmalloc.constprop.17+0xc7/0xd0 mm/kasan/common.c:513 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:527 __do_kmalloc_node mm/slab.c:3616 [inline] __kmalloc_node_track_caller+0x4d/0x70 mm/slab.c:3630 __kmalloc_reserve.isra.46+0x2c/0xc0 net/core/skbuff.c:141 __alloc_skb+0xd7/0x570 net/core/skbuff.c:209 alloc_skb include/linux/skbuff.h:1049 [inline] alloc_uevent_skb+0x84/0x220 lib/kobject_uevent.c:289 uevent_net_broadcast_tagged lib/kobject_uevent.c:350 [inline] kobject_uevent_net_broadcast lib/kobject_uevent.c:411 [inline] kobject_uevent_env+0xbf1/0xe90 lib/kobject_uevent.c:592 kobject_uevent+0xb/0x10 lib/kobject_uevent.c:641 rx_queue_add_kobject net/core/net-sysfs.c:939 [inline] net_rx_queue_update_kobjects+0xab/0x3a0 net/core/net-sysfs.c:961 register_queue_kobjects net/core/net-sysfs.c:1536 [inline] netdev_register_kobject+0x249/0x360 net/core/net-sysfs.c:1759 register_netdevice+0x489/0xf00 net/core/dev.c:9333 __rtnl_newlink+0x1091/0x1480 net/core/rtnetlink.c:3322 rtnl_newlink+0x61/0x90 net/core/rtnetlink.c:3368 rtnetlink_rcv_msg+0x34a/0x8d0 net/core/rtnetlink.c:5429 netlink_rcv_skb+0x13c/0x380 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x10/0x20 net/core/rtnetlink.c:5447 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x45e/0x6a0 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x7b0/0xcb0 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:643 [inline] sock_sendmsg+0xb5/0xf0 net/socket.c:663 __sys_sendto+0x1f2/0x2e0 net/socket.c:1997 __do_sys_sendto net/socket.c:2009 [inline] __se_sys_sendto net/socket.c:2005 [inline] __x64_sys_sendto+0xdc/0x1a0 net/socket.c:2005 do_syscall_64+0xca/0x5f0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 8623: save_stack+0x21/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] kasan_set_free_info mm/kasan/common.c:335 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:474 kasan_slab_free+0xe/0x10 mm/kasan/common.c:483 __cache_free mm/slab.c:3426 [inline] kfree+0x108/0x2c0 mm/slab.c:3757 skb_free_head+0x6e/0x90 net/core/skbuff.c:591 skb_release_data+0x27f/0x3f0 net/core/skbuff.c:611 skb_release_all+0x3d/0x50 net/core/skbuff.c:665 __kfree_skb net/core/skbuff.c:679 [inline] consume_skb+0xad/0x2d0 net/core/skbuff.c:838 netlink_broadcast_filtered+0x2b9/0xaa0 net/netlink/af_netlink.c:1512 netlink_broadcast+0xe/0x10 net/netlink/af_netlink.c:1534 uevent_net_broadcast_tagged lib/kobject_uevent.c:371 [inline] kobject_uevent_net_broadcast lib/kobject_uevent.c:411 [inline] kobject_uevent_env+0xc97/0xe90 lib/kobject_uevent.c:592 kobject_uevent+0xb/0x10 lib/kobject_uevent.c:641 rx_queue_add_kobject net/core/net-sysfs.c:939 [inline] net_rx_queue_update_kobjects+0xab/0x3a0 net/core/net-sysfs.c:961 register_queue_kobjects net/core/net-sysfs.c:1536 [inline] netdev_register_kobject+0x249/0x360 net/core/net-sysfs.c:1759 register_netdevice+0x489/0xf00 net/core/dev.c:9333 __rtnl_newlink+0x1091/0x1480 net/core/rtnetlink.c:3322 rtnl_newlink+0x61/0x90 net/core/rtnetlink.c:3368 rtnetlink_rcv_msg+0x34a/0x8d0 net/core/rtnetlink.c:5429 netlink_rcv_skb+0x13c/0x380 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x10/0x20 net/core/rtnetlink.c:5447 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x45e/0x6a0 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x7b0/0xcb0 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:643 [inline] sock_sendmsg+0xb5/0xf0 net/socket.c:663 __sys_sendto+0x1f2/0x2e0 net/socket.c:1997 __do_sys_sendto net/socket.c:2009 [inline] __se_sys_sendto net/socket.c:2005 [inline] __x64_sys_sendto+0xdc/0x1a0 net/socket.c:2005 do_syscall_64+0xca/0x5f0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8880a8bf2400 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 60 bytes inside of 512-byte region [ffff8880a8bf2400, ffff8880a8bf2600) The buggy address belongs to the page: page:ffffea0002a2fc80 refcount:1 mapcount:0 mapping:ffff8880aa400a80 index:0x0 raw: 00fffe0000000200 ffffea000255ee48 ffffea000222b808 ffff8880aa400a80 raw: 0000000000000000 ffff8880a8bf2000 0000000100000004 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a8bf2300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a8bf2380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880a8bf2400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a8bf2480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a8bf2500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================