KASAN: use-after-free Read in bcmp

Status: upstream: reported on 2026/10/28 18:11
Reported-by: syzbot+a471f661719e26e96401@syzkaller.appspotmail.com
First crash: 3d11h, last: 3d11h
▶ ▼ Similar bugs (7)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KMSAN: uninit-value in bcmp net 19 syz, C error done 907 1381d 2702d 22/29 fixed on 2023/02/24 13:50
android-5-15 KASAN: use-after-free Read in bcmp 19 syz, C 8 13d 16d 0/2 upstream: reported C repro on 2026/10/16 04:26
android-5-10 KASAN: slab-out-of-bounds Read in bcmp 19 syz, C 4 7h00m 1d09h 0/2 upstream: reported C repro on 2026/10/30 19:57
upstream KASAN: use-after-free Read in bcmp ntfs3 19 syz, C done 289 1049d 1207d 25/29 fixed on 2023/12/21 03:45
android-6-12 KASAN: slab-use-after-free Read in bcmp 19 syz, C 30 10d 19d 0/1 premoderation: reported C repro on 2026/10/12 20:33
upstream KMSAN: uninit-value in bcmp (3) ntfs3 19 syz, C error 625 331d 811d 29/29 fixed on 2026/01/07 12:29
upstream KMSAN: uninit-value in bcmp (2) sound 7 syz, C 7 999d 1021d 25/29 fixed on 2024/04/10 03:59

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in memcmp lib/string.c:783 [inline]
BUG: KASAN: use-after-free in bcmp+0x200/0x220 lib/string.c:804
Read of size 1 at addr ffff88807cb131da by task kworker/0:3/4276

CPU: 0 PID: 4276 Comm: kworker/0:3 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/07/2026
Workqueue: usb_hub_wq hub_event
Call Trace:
 <TASK>
 dump_stack_lvl+0x188/0x24e lib/dump_stack.c:106
 print_address_description mm/kasan/report.c:316 [inline]
 print_report+0xa8/0x210 mm/kasan/report.c:420
 kasan_report+0x10b/0x140 mm/kasan/report.c:524
 memcmp lib/string.c:783 [inline]
 bcmp+0x200/0x220 lib/string.c:804
 memcmp include/linux/fortify-string.h:549 [inline]
 sony_check_add_dev_list drivers/hid/hid-sony.c:2542 [inline]
 sony_check_add drivers/hid/hid-sony.c:2673 [inline]
 sony_input_configured+0x62f/0x36c0 drivers/hid/hid-sony.c:2752
 hidinput_connect+0x2025/0x2d10 drivers/hid/hid-input.c:2344
 hid_connect+0x4b0/0x1b30 drivers/hid/hid-core.c:2234
 hid_hw_start+0x99/0x100 drivers/hid/hid-core.c:2347
 sony_probe+0x217/0xca0 drivers/hid/hid-sony.c:3024
 __hid_device_probe drivers/hid/hid-core.c:2678 [inline]
 hid_device_probe+0x2b8/0x520 drivers/hid/hid-core.c:2717
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x24a/0xb40 drivers/base/dd.c:638
 __driver_probe_device+0x1f5/0x390 drivers/base/dd.c:804
 driver_probe_device+0x4f/0x420 drivers/base/dd.c:834
 __device_attach_driver+0x2c6/0x510 drivers/base/dd.c:962
 bus_for_each_drv+0x184/0x210 drivers/base/bus.c:429
 __device_attach+0x2a7/0x480 drivers/base/dd.c:1034
 bus_probe_device+0xba/0x1d0 drivers/base/bus.c:489
 device_add+0xbcf/0x1050 drivers/base/core.c:3712
 hid_add_device+0x361/0x500 drivers/hid/hid-core.c:2863
 usbhid_probe+0xc3f/0x1010 drivers/hid/usbhid/hid-core.c:1442
 usb_probe_interface+0x6e7/0xcf0 drivers/usb/core/driver.c:395
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x24a/0xb40 drivers/base/dd.c:638
 __driver_probe_device+0x1f5/0x390 drivers/base/dd.c:804
 driver_probe_device+0x4f/0x420 drivers/base/dd.c:834
 __device_attach_driver+0x2c6/0x510 drivers/base/dd.c:962
 bus_for_each_drv+0x184/0x210 drivers/base/bus.c:429
 __device_attach+0x2a7/0x480 drivers/base/dd.c:1034
 bus_probe_device+0xba/0x1d0 drivers/base/bus.c:489
 device_add+0xbcf/0x1050 drivers/base/core.c:3712
 usb_set_configuration+0x19d5/0x2030 drivers/usb/core/message.c:2223
 usb_generic_driver_probe+0x89/0x150 drivers/usb/core/generic.c:238
 usb_probe_device+0x126/0x250 drivers/usb/core/driver.c:291
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x24a/0xb40 drivers/base/dd.c:638
 __driver_probe_device+0x1f5/0x390 drivers/base/dd.c:804
 driver_probe_device+0x4f/0x420 drivers/base/dd.c:834
 __device_attach_driver+0x2c6/0x510 drivers/base/dd.c:962
 bus_for_each_drv+0x184/0x210 drivers/base/bus.c:429
 __device_attach+0x2a7/0x480 drivers/base/dd.c:1034
 bus_probe_device+0xba/0x1d0 drivers/base/bus.c:489
 device_add+0xbcf/0x1050 drivers/base/core.c:3712
 usb_new_device+0xa01/0x15e0 drivers/usb/core/hub.c:2664
 hub_port_connect drivers/usb/core/hub.c:5522 [inline]
 hub_port_connect_change drivers/usb/core/hub.c:5662 [inline]
 port_event drivers/usb/core/hub.c:5822 [inline]
 hub_event+0x2b2f/0x5200 drivers/usb/core/hub.c:5904
 process_one_work+0x8ab/0x1160 kernel/workqueue.c:2292
 worker_thread+0xaf5/0x12a0 kernel/workqueue.c:2439
 kthread+0x29d/0x330 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
 </TASK>

Allocated by task 4333:
 kasan_save_stack mm/kasan/common.c:46 [inline]
 kasan_set_track+0x4b/0x70 mm/kasan/common.c:53
 ____kasan_kmalloc mm/kasan/common.c:375 [inline]
 __kasan_kmalloc+0x8e/0xa0 mm/kasan/common.c:384
 kasan_kmalloc include/linux/kasan.h:211 [inline]
 __do_kmalloc_node mm/slab_common.c:936 [inline]
 __kmalloc+0xb3/0x240 mm/slab_common.c:949
 kmalloc include/linux/slab.h:568 [inline]
 kzalloc include/linux/slab.h:699 [inline]
 ieee802_11_parse_elems_full+0xb4/0x1240 net/mac80211/util.c:1503
 ieee802_11_parse_elems_crc net/mac80211/ieee80211_i.h:2270 [inline]
 ieee802_11_parse_elems net/mac80211/ieee80211_i.h:2277 [inline]
 ieee80211_bss_info_update+0x7df/0xbf0 net/mac80211/scan.c:212
 ieee80211_rx_bss_info net/mac80211/ibss.c:1120 [inline]
 ieee80211_rx_mgmt_probe_beacon net/mac80211/ibss.c:1609 [inline]
 ieee80211_ibss_rx_queued_mgmt+0x1931/0x2eb0 net/mac80211/ibss.c:1638
 ieee80211_iface_process_skb net/mac80211/iface.c:1711 [inline]
 ieee80211_iface_work+0x72c/0xc70 net/mac80211/iface.c:1765
 cfg80211_wiphy_work+0x224/0x260 net/wireless/core.c:433
 process_one_work+0x8ab/0x1160 kernel/workqueue.c:2292
 worker_thread+0xaf5/0x12a0 kernel/workqueue.c:2439
 kthread+0x29d/0x330 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

Freed by task 4333:
 kasan_save_stack mm/kasan/common.c:46 [inline]
 kasan_set_track+0x4b/0x70 mm/kasan/common.c:53
 kasan_save_free_info+0x27/0x40 mm/kasan/generic.c:516
 ____kasan_slab_free+0x126/0x1f0 mm/kasan/common.c:237
 kasan_slab_free include/linux/kasan.h:177 [inline]
 slab_free_hook mm/slub.c:1729 [inline]
 slab_free_freelist_hook+0x133/0x1b0 mm/slub.c:1755
 slab_free mm/slub.c:3687 [inline]
 __kmem_cache_free+0xb6/0x200 mm/slub.c:3700
 ieee80211_bss_info_update+0x889/0xbf0 net/mac80211/scan.c:223
 ieee80211_rx_bss_info net/mac80211/ibss.c:1120 [inline]
 ieee80211_rx_mgmt_probe_beacon net/mac80211/ibss.c:1609 [inline]
 ieee80211_ibss_rx_queued_mgmt+0x1931/0x2eb0 net/mac80211/ibss.c:1638
 ieee80211_iface_process_skb net/mac80211/iface.c:1711 [inline]
 ieee80211_iface_work+0x72c/0xc70 net/mac80211/iface.c:1765
 cfg80211_wiphy_work+0x224/0x260 net/wireless/core.c:433
 process_one_work+0x8ab/0x1160 kernel/workqueue.c:2292
 worker_thread+0xaf5/0x12a0 kernel/workqueue.c:2439
 kthread+0x29d/0x330 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

The buggy address belongs to the object at ffff88807cb13000
 which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 474 bytes inside of
 1024-byte region [ffff88807cb13000, ffff88807cb13400)

The buggy address belongs to the physical page:
page:ffffea0001f2c400 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7cb10
head:ffffea0001f2c400 order:3 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 0000000000000000 dead000000000001 ffff888018441dc0
raw: 0000000000000000 0000000000100010 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 0xd2a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 4391, tgid 4391 (kworker/u4:6), ts 75340254316, free_ts 75287928591
 set_page_owner include/linux/page_owner.h:31 [inline]
 post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2560
 prep_new_page mm/page_alloc.c:2567 [inline]
 get_page_from_freelist+0x206b/0x2180 mm/page_alloc.c:4358
 __alloc_pages+0x1ec/0x4f0 mm/page_alloc.c:5658
 alloc_slab_page+0x5d/0x180 mm/slub.c:1799
 allocate_slab mm/slub.c:1944 [inline]
 new_slab+0x87/0x2d0 mm/slub.c:1997
 ___slab_alloc+0xbc5/0x1240 mm/slub.c:3154
 __slab_alloc mm/slub.c:3240 [inline]
 slab_alloc_node mm/slub.c:3325 [inline]
 __kmem_cache_alloc_node+0x126/0x270 mm/slub.c:3398
 __do_kmalloc_node mm/slab_common.c:935 [inline]
 __kmalloc_node_track_caller+0xa0/0x240 mm/slab_common.c:956
 kmalloc_reserve net/core/skbuff.c:446 [inline]
 __alloc_skb+0x226/0x7d0 net/core/skbuff.c:515
 alloc_skb include/linux/skbuff.h:1303 [inline]
 nlmsg_new include/net/netlink.h:998 [inline]
 br_info_notify+0x101/0x240 net/bridge/br_netlink.c:631
 br_make_forwarding+0x131/0x1f0 net/bridge/br_stp.c:464
 br_port_state_selection+0x291/0x620 net/bridge/br_stp.c:488
 br_stp_enable_port+0x168/0x240 net/bridge/br_stp_if.c:94
 br_port_carrier_check+0x2f0/0x3d0 net/bridge/br_if.c:89
 br_device_event+0x533/0x8f0 net/bridge/br.c:94
 notifier_call_chain kernel/notifier.c:87 [inline]
 raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:455
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1487 [inline]
 free_pcp_prepare mm/page_alloc.c:1537 [inline]
 free_unref_page_prepare+0x8e5/0x9e0 mm/page_alloc.c:3414
 free_unref_page+0x2e/0x3f0 mm/page_alloc.c:3509
 free_slab mm/slub.c:2036 [inline]
 discard_slab mm/slub.c:2042 [inline]
 __unfreeze_partials+0x188/0x1e0 mm/slub.c:2591
 put_cpu_partial+0x17c/0x250 mm/slub.c:2667
 qlink_free mm/kasan/quarantine.c:168 [inline]
 qlist_free_all+0x76/0xe0 mm/kasan/quarantine.c:187
 kasan_quarantine_reduce+0x144/0x160 mm/kasan/quarantine.c:294
 __kasan_slab_alloc+0x1e/0x80 mm/kasan/common.c:306
 kasan_slab_alloc include/linux/kasan.h:201 [inline]
 slab_post_alloc_hook+0x4b/0x490 mm/slab.h:737
 slab_alloc_node mm/slub.c:3359 [inline]
 __kmem_cache_alloc_node+0x19d/0x270 mm/slub.c:3398
 __do_kmalloc_node mm/slab_common.c:935 [inline]
 __kmalloc+0xa3/0x240 mm/slab_common.c:949
 kmalloc include/linux/slab.h:568 [inline]
 kzalloc include/linux/slab.h:699 [inline]
 fib6_info_alloc+0x2e/0xe0 net/ipv6/ip6_fib.c:156
 ip6_route_info_create+0x455/0x1220 net/ipv6/route.c:3800
 ip6_route_add+0x24/0x130 net/ipv6/route.c:3896
 addrconf_add_mroute net/ipv6/addrconf.c:2514 [inline]
 addrconf_add_dev+0x298/0x3a0 net/ipv6/addrconf.c:2532
 addrconf_dev_config net/ipv6/addrconf.c:3439 [inline]
 addrconf_init_auto_addrs+0x63e/0xaa0 net/ipv6/addrconf.c:3527
 addrconf_notify+0xacd/0xf60 net/ipv6/addrconf.c:3700

Memory state around the buggy address:
 ffff88807cb13080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88807cb13100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88807cb13180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                                    ^
 ffff88807cb13200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88807cb13280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/10/28 18:11 linux-6.1.y 79807e970724 858db2ec .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in bcmp
2026/10/28 18:11 linux-6.1.y 79807e970724 858db2ec .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in bcmp
* Struck through repros no longer work on HEAD.