==================================================================
BUG: KASAN: slab-use-after-free in skb_dst_drop include/net/dst.h:274 [inline]
BUG: KASAN: slab-use-after-free in skb_release_head_state+0x283/0x2b0 net/core/skbuff.c:1157
Read of size 8 at addr ffff88807ba2b7d8 by task syz.0.2308/14291
CPU: 0 PID: 14291 Comm: syz.0.2308 Not tainted 6.10.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114
print_address_description mm/kasan/report.c:377 [inline]
print_report+0xc3/0x620 mm/kasan/report.c:488
kasan_report+0xd9/0x110 mm/kasan/report.c:601
skb_dst_drop include/net/dst.h:274 [inline]
skb_release_head_state+0x283/0x2b0 net/core/skbuff.c:1157
skb_release_all net/core/skbuff.c:1171 [inline]
__kfree_skb net/core/skbuff.c:1187 [inline]
kfree_skb_reason+0xed/0x210 net/core/skbuff.c:1223
kfree_skb include/linux/skbuff.h:1257 [inline]
__hci_req_sync+0x61d/0x980 net/bluetooth/hci_request.c:184
hci_req_sync+0x97/0xd0 net/bluetooth/hci_request.c:206
hci_inquiry+0x3ea/0x950 net/bluetooth/hci_core.c:383
hci_sock_ioctl+0x2bb/0x880 net/bluetooth/hci_sock.c:1153
sock_do_ioctl+0x119/0x280 net/socket.c:1222
sock_ioctl+0x22e/0x6c0 net/socket.c:1341
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:907 [inline]
__se_sys_ioctl fs/ioctl.c:893 [inline]
__x64_sys_ioctl+0x196/0x220 fs/ioctl.c:893
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f2950575bd9
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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f29512c7048 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f2950703f60 RCX: 00007f2950575bd9
RDX: 0000000020000100 RSI: 00000000800448f0 RDI: 0000000000000004
RBP: 00007f29505e4e60 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007f2950703f60 R15: 00007fffdafed788
Allocated by task 53:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
unpoison_slab_object mm/kasan/common.c:312 [inline]
__kasan_slab_alloc+0x89/0x90 mm/kasan/common.c:338
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook mm/slub.c:3940 [inline]
slab_alloc_node mm/slub.c:4002 [inline]
kmem_cache_alloc_noprof+0x121/0x2f0 mm/slub.c:4009
skb_clone+0x190/0x3f0 net/core/skbuff.c:2052
hci_send_cmd_sync net/bluetooth/hci_core.c:4091 [inline]
hci_cmd_work+0x66a/0x710 net/bluetooth/hci_core.c:4111
process_one_work+0x9c8/0x1b40 kernel/workqueue.c:3248
process_scheduled_works kernel/workqueue.c:3329 [inline]
worker_thread+0x6c8/0xf30 kernel/workqueue.c:3409
kthread+0x2c4/0x3a0 kernel/kthread.c:389
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
Freed by task 53:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:579
poison_slab_object+0xf7/0x160 mm/kasan/common.c:240
__kasan_slab_free+0x32/0x50 mm/kasan/common.c:256
kasan_slab_free include/linux/kasan.h:184 [inline]
slab_free_hook mm/slub.c:2196 [inline]
slab_free mm/slub.c:4438 [inline]
kmem_cache_free+0x12f/0x3a0 mm/slub.c:4513
kfree_skbmem+0x10e/0x200 net/core/skbuff.c:1131
__kfree_skb net/core/skbuff.c:1188 [inline]
kfree_skb_reason+0x138/0x210 net/core/skbuff.c:1223
kfree_skb include/linux/skbuff.h:1257 [inline]
hci_send_cmd_sync net/bluetooth/hci_core.c:4090 [inline]
hci_cmd_work+0x63e/0x710 net/bluetooth/hci_core.c:4111
process_one_work+0x9c8/0x1b40 kernel/workqueue.c:3248
process_scheduled_works kernel/workqueue.c:3329 [inline]
worker_thread+0x6c8/0xf30 kernel/workqueue.c:3409
kthread+0x2c4/0x3a0 kernel/kthread.c:389
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
The buggy address belongs to the object at ffff88807ba2b780
which belongs to the cache skbuff_head_cache of size 240
The buggy address is located 88 bytes inside of
freed 240-byte region [ffff88807ba2b780, ffff88807ba2b870)
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7ba2b
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffefff(slab)
raw: 00fff00000000000 ffff888018eda780 ffffea0001f97b00 dead000000000004
raw: 0000000000000000 00000000000c000c 00000001ffffefff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x172820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_MEMALLOC|__GFP_HARDWALL), pid 1101, tgid 1101 (kworker/u8:6), ts 534994772533, free_ts 534863532906
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1473
prep_new_page mm/page_alloc.c:1481 [inline]
get_page_from_freelist+0x1353/0x2e50 mm/page_alloc.c:3425
__alloc_pages_noprof+0x22b/0x2460 mm/page_alloc.c:4683
__alloc_pages_node_noprof include/linux/gfp.h:269 [inline]
alloc_pages_node_noprof include/linux/gfp.h:296 [inline]
alloc_slab_page+0x56/0x110 mm/slub.c:2265
allocate_slab mm/slub.c:2428 [inline]
new_slab+0x84/0x260 mm/slub.c:2481
___slab_alloc+0xdac/0x1870 mm/slub.c:3667
__slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3757
__slab_alloc_node mm/slub.c:3810 [inline]
slab_alloc_node mm/slub.c:3990 [inline]
kmem_cache_alloc_node_noprof+0xed/0x310 mm/slub.c:4045
__alloc_skb+0x2b1/0x380 net/core/skbuff.c:656
__netdev_alloc_skb+0x72/0x3f0 net/core/skbuff.c:730
__netdev_alloc_skb_ip_align include/linux/skbuff.h:3339 [inline]
netdev_alloc_skb_ip_align include/linux/skbuff.h:3349 [inline]
batadv_iv_ogm_aggregate_new+0x104/0x4a0 net/batman-adv/bat_iv_ogm.c:558
batadv_iv_ogm_queue_add net/batman-adv/bat_iv_ogm.c:670 [inline]
batadv_iv_ogm_schedule_buff+0x99b/0x1500 net/batman-adv/bat_iv_ogm.c:833
batadv_iv_ogm_schedule net/batman-adv/bat_iv_ogm.c:868 [inline]
batadv_iv_ogm_schedule net/batman-adv/bat_iv_ogm.c:861 [inline]
batadv_iv_send_outstanding_bat_ogm_packet+0x31e/0x8d0 net/batman-adv/bat_iv_ogm.c:1712
process_one_work+0x9c8/0x1b40 kernel/workqueue.c:3248
process_scheduled_works kernel/workqueue.c:3329 [inline]
worker_thread+0x6c8/0xf30 kernel/workqueue.c:3409
kthread+0x2c4/0x3a0 kernel/kthread.c:389
page last free pid 8937 tgid 8937 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1093 [inline]
free_unref_page+0x64a/0xe40 mm/page_alloc.c:2588
__put_partials+0x14c/0x170 mm/slub.c:2995
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x4e/0x140 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x192/0x1e0 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:322
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook mm/slub.c:3940 [inline]
slab_alloc_node mm/slub.c:4002 [inline]
kmalloc_trace_noprof+0x11e/0x300 mm/slub.c:4149
kmalloc_noprof include/linux/slab.h:660 [inline]
kzalloc_noprof include/linux/slab.h:778 [inline]
kernfs_fop_open+0x28b/0xdb0 fs/kernfs/file.c:623
do_dentry_open+0x922/0x15f0 fs/open.c:955
vfs_open+0x82/0x3f0 fs/open.c:1086
do_open fs/namei.c:3654 [inline]
path_openat+0x21fc/0x2e50 fs/namei.c:3813
do_filp_open+0x1dc/0x430 fs/namei.c:3840
do_sys_openat2+0x17a/0x1e0 fs/open.c:1413
do_sys_open fs/open.c:1428 [inline]
__do_sys_openat fs/open.c:1444 [inline]
__se_sys_openat fs/open.c:1439 [inline]
__x64_sys_openat+0x175/0x210 fs/open.c:1439
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff88807ba2b680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88807ba2b700: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc
>ffff88807ba2b780: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88807ba2b800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc
ffff88807ba2b880: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
==================================================================
==================================================================
BUG: KASAN: slab-use-after-free in skb_release_head_state+0x28d/0x2b0 net/core/skbuff.c:1158
Read of size 8 at addr ffff88807ba2b7e0 by task syz.0.2308/14291
CPU: 1 PID: 14291 Comm: syz.0.2308 Tainted: G B 6.10.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114
print_address_description mm/kasan/report.c:377 [inline]
print_report+0xc3/0x620 mm/kasan/report.c:488
kasan_report+0xd9/0x110 mm/kasan/report.c:601
skb_release_head_state+0x28d/0x2b0 net/core/skbuff.c:1158
skb_release_all net/core/skbuff.c:1171 [inline]
__kfree_skb net/core/skbuff.c:1187 [inline]
kfree_skb_reason+0xed/0x210 net/core/skbuff.c:1223
kfree_skb include/linux/skbuff.h:1257 [inline]
__hci_req_sync+0x61d/0x980 net/bluetooth/hci_request.c:184
hci_req_sync+0x97/0xd0 net/bluetooth/hci_request.c:206
hci_inquiry+0x3ea/0x950 net/bluetooth/hci_core.c:383
hci_sock_ioctl+0x2bb/0x880 net/bluetooth/hci_sock.c:1153
sock_do_ioctl+0x119/0x280 net/socket.c:1222
sock_ioctl+0x22e/0x6c0 net/socket.c:1341
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:907 [inline]
__se_sys_ioctl fs/ioctl.c:893 [inline]
__x64_sys_ioctl+0x196/0x220 fs/ioctl.c:893
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f2950575bd9
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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f29512c7048 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f2950703f60 RCX: 00007f2950575bd9
RDX: 0000000020000100 RSI: 00000000800448f0 RDI: 0000000000000004
RBP: 00007f29505e4e60 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007f2950703f60 R15: 00007fffdafed788
Allocated by task 53:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
unpoison_slab_object mm/kasan/common.c:312 [inline]
__kasan_slab_alloc+0x89/0x90 mm/kasan/common.c:338
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook mm/slub.c:3940 [inline]
slab_alloc_node mm/slub.c:4002 [inline]
kmem_cache_alloc_noprof+0x121/0x2f0 mm/slub.c:4009
skb_clone+0x190/0x3f0 net/core/skbuff.c:2052
hci_send_cmd_sync net/bluetooth/hci_core.c:4091 [inline]
hci_cmd_work+0x66a/0x710 net/bluetooth/hci_core.c:4111
process_one_work+0x9c8/0x1b40 kernel/workqueue.c:3248
process_scheduled_works kernel/workqueue.c:3329 [inline]
worker_thread+0x6c8/0xf30 kernel/workqueue.c:3409
kthread+0x2c4/0x3a0 kernel/kthread.c:389
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
Freed by task 53:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:579
poison_slab_object+0xf7/0x160 mm/kasan/common.c:240
__kasan_slab_free+0x32/0x50 mm/kasan/common.c:256
kasan_slab_free include/linux/kasan.h:184 [inline]
slab_free_hook mm/slub.c:2196 [inline]
slab_free mm/slub.c:4438 [inline]
kmem_cache_free+0x12f/0x3a0 mm/slub.c:4513
kfree_skbmem+0x10e/0x200 net/core/skbuff.c:1131
__kfree_skb net/core/skbuff.c:1188 [inline]
kfree_skb_reason+0x138/0x210 net/core/skbuff.c:1223
kfree_skb include/linux/skbuff.h:1257 [inline]
hci_send_cmd_sync net/bluetooth/hci_core.c:4090 [inline]
hci_cmd_work+0x63e/0x710 net/bluetooth/hci_core.c:4111
process_one_work+0x9c8/0x1b40 kernel/workqueue.c:3248
process_scheduled_works kernel/workqueue.c:3329 [inline]
worker_thread+0x6c8/0xf30 kernel/workqueue.c:3409
kthread+0x2c4/0x3a0 kernel/kthread.c:389
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
The buggy address belongs to the object at ffff88807ba2b780
which belongs to the cache skbuff_head_cache of size 240
The buggy address is located 96 bytes inside of
freed 240-byte region [ffff88807ba2b780, ffff88807ba2b870)
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7ba2b
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffefff(slab)
raw: 00fff00000000000 ffff888018eda780 ffffea0001f97b00 dead000000000004
raw: 0000000000000000 00000000000c000c 00000001ffffefff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x172820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_MEMALLOC|__GFP_HARDWALL), pid 1101, tgid 1101 (kworker/u8:6), ts 534994772533, free_ts 534863532906
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1473
prep_new_page mm/page_alloc.c:1481 [inline]
get_page_from_freelist+0x1353/0x2e50 mm/page_alloc.c:3425
__alloc_pages_noprof+0x22b/0x2460 mm/page_alloc.c:4683
__alloc_pages_node_noprof include/linux/gfp.h:269 [inline]
alloc_pages_node_noprof include/linux/gfp.h:296 [inline]
alloc_slab_page+0x56/0x110 mm/slub.c:2265
allocate_slab mm/slub.c:2428 [inline]
new_slab+0x84/0x260 mm/slub.c:2481
___slab_alloc+0xdac/0x1870 mm/slub.c:3667
__slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3757
__slab_alloc_node mm/slub.c:3810 [inline]
slab_alloc_node mm/slub.c:3990 [inline]
kmem_cache_alloc_node_noprof+0xed/0x310 mm/slub.c:4045
__alloc_skb+0x2b1/0x380 net/core/skbuff.c:656
__netdev_alloc_skb+0x72/0x3f0 net/core/skbuff.c:730
__netdev_alloc_skb_ip_align include/linux/skbuff.h:3339 [inline]
netdev_alloc_skb_ip_align include/linux/skbuff.h:3349 [inline]
batadv_iv_ogm_aggregate_new+0x104/0x4a0 net/batman-adv/bat_iv_ogm.c:558
batadv_iv_ogm_queue_add net/batman-adv/bat_iv_ogm.c:670 [inline]
batadv_iv_ogm_schedule_buff+0x99b/0x1500 net/batman-adv/bat_iv_ogm.c:833
batadv_iv_ogm_schedule net/batman-adv/bat_iv_ogm.c:868 [inline]
batadv_iv_ogm_schedule net/batman-adv/bat_iv_ogm.c:861 [inline]
batadv_iv_send_outstanding_bat_ogm_packet+0x31e/0x8d0 net/batman-adv/bat_iv_ogm.c:1712
process_one_work+0x9c8/0x1b40 kernel/workqueue.c:3248
process_scheduled_works kernel/workqueue.c:3329 [inline]
worker_thread+0x6c8/0xf30 kernel/workqueue.c:3409
kthread+0x2c4/0x3a0 kernel/kthread.c:389
page last free pid 8937 tgid 8937 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1093 [inline]
free_unref_page+0x64a/0xe40 mm/page_alloc.c:2588
__put_partials+0x14c/0x170 mm/slub.c:2995
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x4e/0x140 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x192/0x1e0 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:322
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook mm/slub.c:3940 [inline]
slab_alloc_node mm/slub.c:4002 [inline]
kmalloc_trace_noprof+0x11e/0x300 mm/slub.c:4149
kmalloc_noprof include/linux/slab.h:660 [inline]
kzalloc_noprof include/linux/slab.h:778 [inline]
kernfs_fop_open+0x28b/0xdb0 fs/kernfs/file.c:623
do_dentry_open+0x922/0x15f0 fs/open.c:955
vfs_open+0x82/0x3f0 fs/open.c:1086
do_open fs/namei.c:3654 [inline]
path_openat+0x21fc/0x2e50 fs/namei.c:3813
do_filp_open+0x1dc/0x430 fs/namei.c:3840
do_sys_openat2+0x17a/0x1e0 fs/open.c:1413
do_sys_open fs/open.c:1428 [inline]
__do_sys_openat fs/open.c:1444 [inline]
__se_sys_openat fs/open.c:1439 [inline]
__x64_sys_openat+0x175/0x210 fs/open.c:1439
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff88807ba2b680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88807ba2b700: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc
>ffff88807ba2b780: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88807ba2b800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc
ffff88807ba2b880: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
==================================================================
==================================================================
BUG: KASAN: slab-use-after-free in skb_nfct include/linux/skbuff.h:4619 [inline]
BUG: KASAN: slab-use-after-free in skb_release_head_state+0x276/0x2b0 net/core/skbuff.c:1163
Read of size 8 at addr ffff88807ba2b7e8 by task syz.0.2308/14291
CPU: 0 PID: 14291 Comm: syz.0.2308 Tainted: G B 6.10.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114
print_address_description mm/kasan/report.c:377 [inline]
print_report+0xc3/0x620 mm/kasan/report.c:488
kasan_report+0xd9/0x110 mm/kasan/report.c:601
skb_nfct include/linux/skbuff.h:4619 [inline]
skb_release_head_state+0x276/0x2b0 net/core/skbuff.c:1163
skb_release_all net/core/skbuff.c:1171 [inline]
__kfree_skb net/core/skbuff.c:1187 [inline]
kfree_skb_reason+0xed/0x210 net/core/skbuff.c:1223
kfree_skb include/linux/skbuff.h:1257 [inline]
__hci_req_sync+0x61d/0x980 net/bluetooth/hci_request.c:184
hci_req_sync+0x97/0xd0 net/bluetooth/hci_request.c:206
hci_inquiry+0x3ea/0x950 net/bluetooth/hci_core.c:383
hci_sock_ioctl+0x2bb/0x880 net/bluetooth/hci_sock.c:1153
sock_do_ioctl+0x119/0x280 net/socket.c:1222
sock_ioctl+0x22e/0x6c0 net/socket.c:1341
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:907 [inline]
__se_sys_ioctl fs/ioctl.c:893 [inline]
__x64_sys_ioctl+0x196/0x220 fs/ioctl.c:893
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f2950575bd9
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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f29512c7048 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f2950703f60 RCX: 00007f2950575bd9
RDX: 0000000020000100 RSI: 00000000800448f0 RDI: 0000000000000004
RBP: 00007f29505e4e60 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007f2950703f60 R15: 00007fffdafed788
Allocated by task 53:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
unpoison_slab_object mm/kasan/common.c:312 [inline]
__kasan_slab_alloc+0x89/0x90 mm/kasan/common.c:338
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook mm/slub.c:3940 [inline]
slab_alloc_node mm/slub.c:4002 [inline]
kmem_cache_alloc_noprof+0x121/0x2f0 mm/slub.c:4009
skb_clone+0x190/0x3f0 net/core/skbuff.c:2052
hci_send_cmd_sync net/bluetooth/hci_core.c:4091 [inline]
hci_cmd_work+0x66a/0x710 net/bluetooth/hci_core.c:4111
process_one_work+0x9c8/0x1b40 kernel/workqueue.c:3248
process_scheduled_works kernel/workqueue.c:3329 [inline]
worker_thread+0x6c8/0xf30 kernel/workqueue.c:3409
kthread+0x2c4/0x3a0 kernel/kthread.c:389
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
Freed by task 53:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:579
poison_slab_object+0xf7/0x160 mm/kasan/common.c:240
__kasan_slab_free+0x32/0x50 mm/kasan/common.c:256
kasan_slab_free include/linux/kasan.h:184 [inline]
slab_free_hook mm/slub.c:2196 [inline]
slab_free mm/slub.c:4438 [inline]
kmem_cache_free+0x12f/0x3a0 mm/slub.c:4513
kfree_skbmem+0x10e/0x200 net/core/skbuff.c:1131
__kfree_skb net/core/skbuff.c:1188 [inline]
kfree_skb_reason+0x138/0x210 net/core/skbuff.c:1223
kfree_skb include/linux/skbuff.h:1257 [inline]
hci_send_cmd_sync net/bluetooth/hci_core.c:4090 [inline]
hci_cmd_work+0x63e/0x710 net/bluetooth/hci_core.c:4111
process_one_work+0x9c8/0x1b40 kernel/workqueue.c:3248
process_scheduled_works kernel/workqueue.c:3329 [inline]
worker_thread+0x6c8/0xf30 kernel/workqueue.c:3409
kthread+0x2c4/0x3a0 kernel/kthread.c:389
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
The buggy address belongs to the object at ffff88807ba2b780
which belongs to the cache skbuff_head_cache of size 240
The buggy address is located 104 bytes inside of
freed 240-byte region [ffff88807ba2b780, ffff88807ba2b870)
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7ba2b
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffefff(slab)
raw: 00fff00000000000 ffff888018eda780 ffffea0001f97b00 dead000000000004
raw: 0000000000000000 00000000000c000c 00000001ffffefff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x172820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_MEMALLOC|__GFP_HARDWALL), pid 1101, tgid 1101 (kworker/u8:6), ts 534994772533, free_ts 534863532906
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1473
prep_new_page mm/page_alloc.c:1481 [inline]
get_page_from_freelist+0x1353/0x2e50 mm/page_alloc.c:3425
__alloc_pages_noprof+0x22b/0x2460 mm/page_alloc.c:4683
__alloc_pages_node_noprof include/linux/gfp.h:269 [inline]
alloc_pages_node_noprof include/linux/gfp.h:296 [inline]
alloc_slab_page+0x56/0x110 mm/slub.c:2265
allocate_slab mm/slub.c:2428 [inline]
new_slab+0x84/0x260 mm/slub.c:2481
___slab_alloc+0xdac/0x1870 mm/slub.c:3667
__slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3757
__slab_alloc_node mm/slub.c:3810 [inline]
slab_alloc_node mm/slub.c:3990 [inline]
kmem_cache_alloc_node_noprof+0xed/0x310 mm/slub.c:4045
__alloc_skb+0x2b1/0x380 net/core/skbuff.c:656
__netdev_alloc_skb+0x72/0x3f0 net/core/skbuff.c:730
__netdev_alloc_skb_ip_align include/linux/skbuff.h:3339 [inline]
netdev_alloc_skb_ip_align include/linux/skbuff.h:3349 [inline]
batadv_iv_ogm_aggregate_new+0x104/0x4a0 net/batman-adv/bat_iv_ogm.c:558
batadv_iv_ogm_queue_add net/batman-adv/bat_iv_ogm.c:670 [inline]
batadv_iv_ogm_schedule_buff+0x99b/0x1500 net/batman-adv/bat_iv_ogm.c:833
batadv_iv_ogm_schedule net/batman-adv/bat_iv_ogm.c:868 [inline]
batadv_iv_ogm_schedule net/batman-adv/bat_iv_ogm.c:861 [inline]
batadv_iv_send_outstanding_bat_ogm_packet+0x31e/0x8d0 net/batman-adv/bat_iv_ogm.c:1712
process_one_work+0x9c8/0x1b40 kernel/workqueue.c:3248
process_scheduled_works kernel/workqueue.c:3329 [inline]
worker_thread+0x6c8/0xf30 kernel/workqueue.c:3409
kthread+0x2c4/0x3a0 kernel/kthread.c:389
page last free pid 8937 tgid 8937 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1093 [inline]
free_unref_page+0x64a/0xe40 mm/page_alloc.c:2588
__put_partials+0x14c/0x170 mm/slub.c:2995
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x4e/0x140 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x192/0x1e0 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:322
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook mm/slub.c:3940 [inline]
slab_alloc_node mm/slub.c:4002 [inline]
kmalloc_trace_noprof+0x11e/0x300 mm/slub.c:4149
kmalloc_noprof include/linux/slab.h:660 [inline]
kzalloc_noprof include/linux/slab.h:778 [inline]
kernfs_fop_open+0x28b/0xdb0 fs/kernfs/file.c:623
do_dentry_open+0x922/0x15f0 fs/open.c:955
vfs_open+0x82/0x3f0 fs/open.c:1086
do_open fs/namei.c:3654 [inline]
path_openat+0x21fc/0x2e50 fs/namei.c:3813
do_filp_open+0x1dc/0x430 fs/namei.c:3840
do_sys_openat2+0x17a/0x1e0 fs/open.c:1413
do_sys_open fs/open.c:1428 [inline]
__do_sys_openat fs/open.c:1444 [inline]
__se_sys_openat fs/open.c:1439 [inline]
__x64_sys_openat+0x175/0x210 fs/open.c:1439
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff88807ba2b680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88807ba2b700: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc
>ffff88807ba2b780: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88807ba2b800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc
ffff88807ba2b880: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
==================================================================
==================================================================
BUG: KASAN: slab-use-after-free in skb_ext_put include/linux/skbuff.h:4688 [inline]
BUG: KASAN: slab-use-after-free in skb_release_head_state+0x26c/0x2b0 net/core/skbuff.c:1165
Read of size 1 at addr ffff88807ba2b7ff by task syz.0.2308/14291
CPU: 1 PID: 14291 Comm: syz.0.2308 Tainted: G B 6.10.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114
print_address_description mm/kasan/report.c:377 [inline]
print_report+0xc3/0x620 mm/kasan/report.c:488
kasan_report+0xd9/0x110 mm/kasan/report.c:601
skb_ext_put include/linux/skbuff.h:4688 [inline]
skb_release_head_state+0x26c/0x2b0 net/core/skbuff.c:1165
skb_release_all net/core/skbuff.c:1171 [inline]
__kfree_skb net/core/skbuff.c:1187 [inline]
kfree_skb_reason+0xed/0x210 net/core/skbuff.c:1223
kfree_skb include/linux/skbuff.h:1257 [inline]
__hci_req_sync+0x61d/0x980 net/bluetooth/hci_request.c:184
hci_req_sync+0x97/0xd0 net/bluetooth/hci_request.c:206
hci_inquiry+0x3ea/0x950 net/bluetooth/hci_core.c:383
hci_sock_ioctl+0x2bb/0x880 net/bluetooth/hci_sock.c:1153
sock_do_ioctl+0x119/0x280 net/socket.c:1222
sock_ioctl+0x22e/0x6c0 net/socket.c:1341
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:907 [inline]
__se_sys_ioctl fs/ioctl.c:893 [inline]
__x64_sys_ioctl+0x196/0x220 fs/ioctl.c:893
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f2950575bd9
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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f29512c7048 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f2950703f60 RCX: 00007f2950575bd9
RDX: 0000000020000100 RSI: 00000000800448f0 RDI: 0000000000000004
RBP: 00007f29505e4e60 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007f2950703f60 R15: 00007fffdafed788
Allocated by task 53:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
unpoison_slab_object mm/kasan/common.c:312 [inline]
__kasan_slab_alloc+0x89/0x90 mm/kasan/common.c:338
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook mm/slub.c:3940 [inline]
slab_alloc_node mm/slub.c:4002 [inline]
kmem_cache_alloc_noprof+0x121/0x2f0 mm/slub.c:4009
skb_clone+0x190/0x3f0 net/core/skbuff.c:2052
hci_send_cmd_sync net/bluetooth/hci_core.c:4091 [inline]
hci_cmd_work+0x66a/0x710 net/bluetooth/hci_core.c:4111
process_one_work+0x9c8/0x1b40 kernel/workqueue.c:3248
process_scheduled_works kernel/workqueue.c:3329 [inline]
worker_thread+0x6c8/0xf30 kernel/workqueue.c:3409
kthread+0x2c4/0x3a0 kernel/kthread.c:389
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
Freed by task 53:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:579
poison_slab_object+0xf7/0x160 mm/kasan/common.c:240
__kasan_slab_free+0x32/0x50 mm/kasan/common.c:256
kasan_slab_free include/linux/kasan.h:184 [inline]
slab_free_hook mm/slub.c:2196 [inline]
slab_free mm/slub.c:4438 [inline]
kmem_cache_free+0x12f/0x3a0 mm/slub.c:4513
kfree_skbmem+0x10e/0x200 net/core/skbuff.c:1131
__kfree_skb net/core/skbuff.c:1188 [inline]
kfree_skb_reason+0x138/0x210 net/core/skbuff.c:1223
kfree_skb include/linux/skbuff.h:1257 [inline]
hci_send_cmd_sync net/bluetooth/hci_core.c:4090 [inline]
hci_cmd_work+0x63e/0x710 net/bluetooth/hci_core.c:4111
process_one_work+0x9c8/0x1b40 kernel/workqueue.c:3248
process_scheduled_works kernel/workqueue.c:3329 [inline]
worker_thread+0x6c8/0xf30 kernel/workqueue.c:3409
kthread+0x2c4/0x3a0 kernel/kthread.c:389
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
The buggy address belongs to the object at ffff88807ba2b780
which belongs to the cache skbuff_head_cache of size 240
The buggy address is located 127 bytes inside of
freed 240-byte region [ffff88807ba2b780, ffff88807ba2b870)
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7ba2b
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffefff(slab)
raw: 00fff00000000000 ffff888018eda780 ffffea0001f97b00 dead000000000004
raw: 0000000000000000 00000000000c000c 00000001ffffefff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x172820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_MEMALLOC|__GFP_HARDWALL), pid 1101, tgid 1101 (kworker/u8:6), ts 534994772533, free_ts 534863532906
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1473
prep_new_page mm/page_alloc.c:1481 [inline]
get_page_from_freelist+0x1353/0x2e50 mm/page_alloc.c:3425
__alloc_pages_noprof+0x22b/0x2460 mm/page_alloc.c:4683
__alloc_pages_node_noprof include/linux/gfp.h:269 [inline]
alloc_pages_node_noprof include/linux/gfp.h:296 [inline]
alloc_slab_page+0x56/0x110 mm/slub.c:2265
allocate_slab mm/slub.c:2428 [inline]
new_slab+0x84/0x260 mm/slub.c:2481
___slab_alloc+0xdac/0x1870 mm/slub.c:3667
__slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3757
__slab_alloc_node mm/slub.c:3810 [inline]
slab_alloc_node mm/slub.c:3990 [inline]
kmem_cache_alloc_node_noprof+0xed/0x310 mm/slub.c:4045
__alloc_skb+0x2b1/0x380 net/core/skbuff.c:656
__netdev_alloc_skb+0x72/0x3f0 net/core/skbuff.c:730
__netdev_alloc_skb_ip_align include/linux/skbuff.h:3339 [inline]
netdev_alloc_skb_ip_align include/linux/skbuff.h:3349 [inline]
batadv_iv_ogm_aggregate_new+0x104/0x4a0 net/batman-adv/bat_iv_ogm.c:558
batadv_iv_ogm_queue_add net/batman-adv/bat_iv_ogm.c:670 [inline]
batadv_iv_ogm_schedule_buff+0x99b/0x1500 net/batman-adv/bat_iv_ogm.c:833
batadv_iv_ogm_schedule net/batman-adv/bat_iv_ogm.c:868 [inline]
batadv_iv_ogm_schedule net/batman-adv/bat_iv_ogm.c:861 [inline]
batadv_iv_send_outstanding_bat_ogm_packet+0x31e/0x8d0 net/batman-adv/bat_iv_ogm.c:1712
process_one_work+0x9c8/0x1b40 kernel/workqueue.c:3248
process_scheduled_works kernel/workqueue.c:3329 [inline]
worker_thread+0x6c8/0xf30 kernel/workqueue.c:3409
kthread+0x2c4/0x3a0 kernel/kthread.c:389
page last free pid 8937 tgid 8937 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1093 [inline]
free_unref_page+0x64a/0xe40 mm/page_alloc.c:2588
__put_partials+0x14c/0x170 mm/slub.c:2995
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x4e/0x140 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x192/0x1e0 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:322
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook mm/slub.c:3940 [inline]
slab_alloc_node mm/slub.c:4002 [inline]
kmalloc_trace_noprof+0x11e/0x300 mm/slub.c:4149
kmalloc_noprof include/linux/slab.h:660 [inline]
kzalloc_noprof include/linux/slab.h:778 [inline]
kernfs_fop_open+0x28b/0xdb0 fs/kernfs/file.c:623
do_dentry_open+0x922/0x15f0 fs/open.c:955
vfs_open+0x82/0x3f0 fs/open.c:1086
do_open fs/namei.c:3654 [inline]
path_openat+0x21fc/0x2e50 fs/namei.c:3813
do_filp_open+0x1dc/0x430 fs/namei.c:3840
do_sys_openat2+0x17a/0x1e0 fs/open.c:1413
do_sys_open fs/open.c:1428 [inline]
__do_sys_openat fs/open.c:1444 [inline]
__se_sys_openat fs/open.c:1439 [inline]
__x64_sys_openat+0x175/0x210 fs/open.c:1439
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff88807ba2b680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88807ba2b700: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc
>ffff88807ba2b780: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88807ba2b800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc
ffff88807ba2b880: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
==================================================================
==================================================================
BUG: KASAN: slab-use-after-free in skb_release_all net/core/skbuff.c:1172 [inline]
BUG: KASAN: slab-use-after-free in __kfree_skb net/core/skbuff.c:1187 [inline]
BUG: KASAN: slab-use-after-free in kfree_skb_reason+0x1ff/0x210 net/core/skbuff.c:1223
Read of size 8 at addr ffff88807ba2b850 by task syz.0.2308/14291
CPU: 0 PID: 14291 Comm: syz.0.2308 Tainted: G B 6.10.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114
print_address_description mm/kasan/report.c:377 [inline]
print_report+0xc3/0x620 mm/kasan/report.c:488
kasan_report+0xd9/0x110 mm/kasan/report.c:601
skb_release_all net/core/skbuff.c:1172 [inline]
__kfree_skb net/core/skbuff.c:1187 [inline]
kfree_skb_reason+0x1ff/0x210 net/core/skbuff.c:1223
kfree_skb include/linux/skbuff.h:1257 [inline]
__hci_req_sync+0x61d/0x980 net/bluetooth/hci_request.c:184
hci_req_sync+0x97/0xd0 net/bluetooth/hci_request.c:206
hci_inquiry+0x3ea/0x950 net/bluetooth/hci_core.c:383
hci_sock_ioctl+0x2bb/0x880 net/bluetooth/hci_sock.c:1153
sock_do_ioctl+0x119/0x280 net/socket.c:1222
sock_ioctl+0x22e/0x6c0 net/socket.c:1341
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:907 [inline]
__se_sys_ioctl fs/ioctl.c:893 [inline]
__x64_sys_ioctl+0x196/0x220 fs/ioctl.c:893
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f2950575bd9
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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f29512c7048 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f2950703f60 RCX: 00007f2950575bd9
RDX: 0000000020000100 RSI: 00000000800448f0 RDI: 0000000000000004
RBP: 00007f29505e4e60 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007f2950703f60 R15: 00007fffdafed788
Allocated by task 53:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
unpoison_slab_object mm/kasan/common.c:312 [inline]
__kasan_slab_alloc+0x89/0x90 mm/kasan/common.c:338
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook mm/slub.c:3940 [inline]
slab_alloc_node mm/slub.c:4002 [inline]
kmem_cache_alloc_noprof+0x121/0x2f0 mm/slub.c:4009
skb_clone+0x190/0x3f0 net/core/skbuff.c:2052
hci_send_cmd_sync net/bluetooth/hci_core.c:4091 [inline]
hci_cmd_work+0x66a/0x710 net/bluetooth/hci_core.c:4111
process_one_work+0x9c8/0x1b40 kernel/workqueue.c:3248
process_scheduled_works kernel/workqueue.c:3329 [inline]
worker_thread+0x6c8/0xf30 kernel/workqueue.c:3409
kthread+0x2c4/0x3a0 kernel/kthread.c:389
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
Freed by task 53:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:579
poison_slab_object+0xf7/0x160 mm/kasan/common.c:240
__kasan_slab_free+0x32/0x50 mm/kasan/common.c:256
kasan_slab_free include/linux/kasan.h:184 [inline]
slab_free_hook mm/slub.c:2196 [inline]
slab_free mm/slub.c:4438 [inline]
kmem_cache_free+0x12f/0x3a0 mm/slub.c:4513
kfree_skbmem+0x10e/0x200 net/core/skbuff.c:1131
__kfree_skb net/core/skbuff.c:1188 [inline]
kfree_skb_reason+0x138/0x210 net/core/skbuff.c:1223
kfree_skb include/linux/skbuff.h:1257 [inline]
hci_send_cmd_sync net/bluetooth/hci_core.c:4090 [inline]
hci_cmd_work+0x63e/0x710 net/bluetooth/hci_core.c:4111
process_one_work+0x9c8/0x1b40 kernel/workqueue.c:3248
process_scheduled_works kernel/workqueue.c:3329 [inline]
worker_thread+0x6c8/0xf30 kernel/workqueue.c:3409
kthread+0x2c4/0x3a0 kernel/kthread.c:389
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
The buggy address belongs to the object at ffff88807ba2b780
which belongs to the cache skbuff_head_cache of size 240
The buggy address is located 208 bytes inside of
freed 240-byte region [ffff88807ba2b780, ffff88807ba2b870)
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7ba2b
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffefff(slab)
raw: 00fff00000000000 ffff888018eda780 ffffea0001f97b00 dead000000000004
raw: 0000000000000000 00000000000c000c 00000001ffffefff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x172820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_MEMALLOC|__GFP_HARDWALL), pid 1101, tgid 1101 (kworker/u8:6), ts 534994772533, free_ts 534863532906
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1473
prep_new_page mm/page_alloc.c:1481 [inline]
get_page_from_freelist+0x1353/0x2e50 mm/page_alloc.c:3425
__alloc_pages_noprof+0x22b/0x2460 mm/page_alloc.c:4683
__alloc_pages_node_noprof include/linux/gfp.h:269 [inline]
alloc_pages_node_noprof include/linux/gfp.h:296 [inline]
alloc_slab_page+0x56/0x110 mm/slub.c:2265
allocate_slab mm/slub.c:2428 [inline]
new_slab+0x84/0x260 mm/slub.c:2481
___slab_alloc+0xdac/0x1870 mm/slub.c:3667
__slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3757
__slab_alloc_node mm/slub.c:3810 [inline]
slab_alloc_node mm/slub.c:3990 [inline]
kmem_cache_alloc_node_noprof+0xed/0x310 mm/slub.c:4045
__alloc_skb+0x2b1/0x380 net/core/skbuff.c:656
__netdev_alloc_skb+0x72/0x3f0 net/core/skbuff.c:730
__netdev_alloc_skb_ip_align include/linux/skbuff.h:3339 [inline]
netdev_alloc_skb_ip_align include/linux/skbuff.h:3349 [inline]
batadv_iv_ogm_aggregate_new+0x104/0x4a0 net/batman-adv/bat_iv_ogm.c:558
batadv_iv_ogm_queue_add net/batman-adv/bat_iv_ogm.c:670 [inline]
batadv_iv_ogm_schedule_buff+0x99b/0x1500 net/batman-adv/bat_iv_ogm.c:833
batadv_iv_ogm_schedule net/batman-adv/bat_iv_ogm.c:868 [inline]
batadv_iv_ogm_schedule net/batman-adv/bat_iv_ogm.c:861 [inline]
batadv_iv_send_outstanding_bat_ogm_packet+0x31e/0x8d0 net/batman-adv/bat_iv_ogm.c:1712
process_one_work+0x9c8/0x1b40 kernel/workqueue.c:3248
process_scheduled_works kernel/workqueue.c:3329 [inline]
worker_thread+0x6c8/0xf30 kernel/workqueue.c:3409
kthread+0x2c4/0x3a0 kernel/kthread.c:389
page last free pid 8937 tgid 8937 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1093 [inline]
free_unref_page+0x64a/0xe40 mm/page_alloc.c:2588
__put_partials+0x14c/0x170 mm/slub.c:2995
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x4e/0x140 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x192/0x1e0 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:322
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook mm/slub.c:3940 [inline]
slab_alloc_node mm/slub.c:4002 [inline]
kmalloc_trace_noprof+0x11e/0x300 mm/slub.c:4149
kmalloc_noprof include/linux/slab.h:660 [inline]
kzalloc_noprof include/linux/slab.h:778 [inline]
kernfs_fop_open+0x28b/0xdb0 fs/kernfs/file.c:623
do_dentry_open+0x922/0x15f0 fs/open.c:955
vfs_open+0x82/0x3f0 fs/open.c:1086
do_open fs/namei.c:3654 [inline]
path_openat+0x21fc/0x2e50 fs/namei.c:3813
do_filp_open+0x1dc/0x430 fs/namei.c:3840
do_sys_openat2+0x17a/0x1e0 fs/open.c:1413
do_sys_open fs/open.c:1428 [inline]
__do_sys_openat fs/open.c:1444 [inline]
__se_sys_openat fs/open.c:1439 [inline]
__x64_sys_openat+0x175/0x210 fs/open.c:1439
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff88807ba2b700: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc
ffff88807ba2b780: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88807ba2b800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc
^
ffff88807ba2b880: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
ffff88807ba2b900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
==================================================================
BUG: KASAN: slab-use-after-free in skb_end_pointer include/linux/skbuff.h:1640 [inline]
BUG: KASAN: slab-use-after-free in skb_release_data+0x8c6/0x980 net/core/skbuff.c:1087
Read of size 8 at addr ffff88807ba2b850 by task syz.0.2308/14291
CPU: 0 PID: 14291 Comm: syz.0.2308 Tainted: G B 6.10.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114
print_address_description mm/kasan/report.c:377 [inline]
print_report+0xc3/0x620 mm/kasan/report.c:488
kasan_report+0xd9/0x110 mm/kasan/report.c:601
skb_end_pointer include/linux/skbuff.h:1640 [inline]
skb_release_data+0x8c6/0x980 net/core/skbuff.c:1087
skb_release_all net/core/skbuff.c:1173 [inline]
__kfree_skb net/core/skbuff.c:1187 [inline]
kfree_skb_reason+0x12b/0x210 net/core/skbuff.c:1223
kfree_skb include/linux/skbuff.h:1257 [inline]
__hci_req_sync+0x61d/0x980 net/bluetooth/hci_request.c:184
hci_req_sync+0x97/0xd0 net/bluetooth/hci_request.c:206
hci_inquiry+0x3ea/0x950 net/bluetooth/hci_core.c:383
hci_sock_ioctl+0x2bb/0x880 net/bluetooth/hci_sock.c:1153
sock_do_ioctl+0x119/0x280 net/socket.c:1222
sock_ioctl+0x22e/0x6c0 net/socket.c:1341
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:907 [inline]
__se_sys_ioctl fs/ioctl.c:893 [inline]
__x64_sys_ioctl+0x196/0x220 fs/ioctl.c:893
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f2950575bd9
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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f29512c7048 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f2950703f60 RCX: 00007f2950575bd9
RDX: 0000000020000100 RSI: 00000000800448f0 RDI: 0000000000000004
RBP: 00007f29505e4e60 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007f2950703f60 R15: 00007fffdafed788
Allocated by task 53:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
unpoison_slab_object mm/kasan/common.c:312 [inline]
__kasan_slab_alloc+0x89/0x90 mm/kasan/common.c:338
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook mm/slub.c:3940 [inline]
slab_alloc_node mm/slub.c:4002 [inline]
kmem_cache_alloc_noprof+0x121/0x2f0 mm/slub.c:4009
skb_clone+0x190/0x3f0 net/core/skbuff.c:2052
hci_send_cmd_sync net/bluetooth/hci_core.c:4091 [inline]
hci_cmd_work+0x66a/0x710 net/bluetooth/hci_core.c:4111
process_one_work+0x9c8/0x1b40 kernel/workqueue.c:3248
process_scheduled_works kernel/workqueue.c:3329 [inline]
worker_thread+0x6c8/0xf30 kernel/workqueue.c:3409
kthread+0x2c4/0x3a0 kernel/kthread.c:389
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
Freed by task 53:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:579
poison_slab_object+0xf7/0x160 mm/kasan/common.c:240
__kasan_slab_free+0x32/0x50 mm/kasan/common.c:256
kasan_slab_free include/linux/kasan.h:184 [inline]
slab_free_hook mm/slub.c:2196 [inline]
slab_free mm/slub.c:4438 [inline]
kmem_cache_free+0x12f/0x3a0 mm/slub.c:4513
kfree_skbmem+0x10e/0x200 net/core/skbuff.c:1131
__kfree_skb net/core/skbuff.c:1188 [inline]
kfree_skb_reason+0x138/0x210 net/core/skbuff.c:1223
kfree_skb include/linux/skbuff.h:1257 [inline]
hci_send_cmd_sync net/bluetooth/hci_core.c:4090 [inline]
hci_cmd_work+0x63e/0x710 net/bluetooth/hci_core.c:4111
process_one_work+0x9c8/0x1b40 kernel/workqueue.c:3248
process_scheduled_works kernel/workqueue.c:3329 [inline]
worker_thread+0x6c8/0xf30 kernel/workqueue.c:3409
kthread+0x2c4/0x3a0 kernel/kthread.c:389
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
The buggy address belongs to the object at ffff88807ba2b780
which belongs to the cache skbuff_head_cache of size 240
The buggy address is located 208 bytes inside of
freed 240-byte region [ffff88807ba2b780, ffff88807ba2b870)
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7ba2b
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffefff(slab)
raw: 00fff00000000000 ffff888018eda780 ffffea0001f97b00 dead000000000004
raw: 0000000000000000 00000000000c000c 00000001ffffefff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x172820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_MEMALLOC|__GFP_HARDWALL), pid 1101, tgid 1101 (kworker/u8:6), ts 534994772533, free_ts 534863532906
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1473
prep_new_page mm/page_alloc.c:1481 [inline]
get_page_from_freelist+0x1353/0x2e50 mm/page_alloc.c:3425
__alloc_pages_noprof+0x22b/0x2460 mm/page_alloc.c:4683
__alloc_pages_node_noprof include/linux/gfp.h:269 [inline]
alloc_pages_node_noprof include/linux/gfp.h:296 [inline]
alloc_slab_page+0x56/0x110 mm/slub.c:2265
allocate_slab mm/slub.c:2428 [inline]
new_slab+0x84/0x260 mm/slub.c:2481
___slab_alloc+0xdac/0x1870 mm/slub.c:3667
__slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3757
__slab_alloc_node mm/slub.c:3810 [inline]
slab_alloc_node mm/slub.c:3990 [inline]
kmem_cache_alloc_node_noprof+0xed/0x310 mm/slub.c:4045
__alloc_skb+0x2b1/0x380 net/core/skbuff.c:656
__netdev_alloc_skb+0x72/0x3f0 net/core/skbuff.c:730
__netdev_alloc_skb_ip_align include/linux/skbuff.h:3339 [inline]
netdev_alloc_skb_ip_align include/linux/skbuff.h:3349 [inline]
batadv_iv_ogm_aggregate_new+0x104/0x4a0 net/batman-adv/bat_iv_ogm.c:558
batadv_iv_ogm_queue_add net/batman-adv/bat_iv_ogm.c:670 [inline]
batadv_iv_ogm_schedule_buff+0x99b/0x1500 net/batman-adv/bat_iv_ogm.c:833
batadv_iv_ogm_schedule net/batman-adv/bat_iv_ogm.c:868 [inline]
batadv_iv_ogm_schedule net/batman-adv/bat_iv_ogm.c:861 [inline]
batadv_iv_send_outstanding_bat_ogm_packet+0x31e/0x8d0 net/batman-adv/bat_iv_ogm.c:1712
process_one_work+0x9c8/0x1b40 kernel/workqueue.c:3248
process_scheduled_works kernel/workqueue.c:3329 [inline]
worker_thread+0x6c8/0xf30 kernel/workqueue.c:3409
kthread+0x2c4/0x3a0 kernel/kthread.c:389
page last free pid 8937 tgid 8937 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1093 [inline]
free_unref_page+0x64a/0xe40 mm/page_alloc.c:2588
__put_partials+0x14c/0x170 mm/slub.c:2995
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x4e/0x140 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x192/0x1e0 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:322
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook mm/slub.c:3940 [inline]
slab_alloc_node mm/slub.c:4002 [inline]
kmalloc_trace_noprof+0x11e/0x300 mm/slub.c:4149
kmalloc_noprof include/linux/slab.h:660 [inline]
kzalloc_noprof include/linux/slab.h:778 [inline]
kernfs_fop_open+0x28b/0xdb0 fs/kernfs/file.c:623
do_dentry_open+0x922/0x15f0 fs/open.c:955
vfs_open+0x82/0x3f0 fs/open.c:1086
do_open fs/namei.c:3654 [inline]
path_openat+0x21fc/0x2e50 fs/namei.c:3813
do_filp_open+0x1dc/0x430 fs/namei.c:3840
do_sys_openat2+0x17a/0x1e0 fs/open.c:1413
do_sys_open fs/open.c:1428 [inline]
__do_sys_openat fs/open.c:1444 [inline]
__se_sys_openat fs/open.c:1439 [inline]
__x64_sys_openat+0x175/0x210 fs/open.c:1439
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff88807ba2b700: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc
ffff88807ba2b780: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88807ba2b800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc
^
ffff88807ba2b880: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
ffff88807ba2b900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
==================================================================
BUG: KASAN: slab-use-after-free in skb_end_pointer include/linux/skbuff.h:1640 [inline]
BUG: KASAN: slab-use-after-free in skb_release_data+0x813/0x980 net/core/skbuff.c:1087
Read of size 4 at addr ffff88807ba2b84c by task syz.0.2308/14291
CPU: 0 PID: 14291 Comm: syz.0.2308 Tainted: G B 6.10.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114
print_address_description mm/kasan/report.c:377 [inline]
print_report+0xc3/0x620 mm/kasan/report.c:488
kasan_report+0xd9/0x110 mm/kasan/report.c:601
skb_end_pointer include/linux/skbuff.h:1640 [inline]
skb_release_data+0x813/0x980 net/core/skbuff.c:1087
skb_release_all net/core/skbuff.c:1173 [inline]
__kfree_skb net/core/skbuff.c:1187 [inline]
kfree_skb_reason+0x12b/0x210 net/core/skbuff.c:1223
kfree_skb include/linux/skbuff.h:1257 [inline]
__hci_req_sync+0x61d/0x980 net/bluetooth/hci_request.c:184
hci_req_sync+0x97/0xd0 net/bluetooth/hci_request.c:206
hci_inquiry+0x3ea/0x950 net/bluetooth/hci_core.c:383
hci_sock_ioctl+0x2bb/0x880 net/bluetooth/hci_sock.c:1153
sock_do_ioctl+0x119/0x280 net/socket.c:1222
sock_ioctl+0x22e/0x6c0 net/socket.c:1341
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:907 [inline]
__se_sys_ioctl fs/ioctl.c:893 [inline]
__x64_sys_ioctl+0x196/0x220 fs/ioctl.c:893
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f2950575bd9
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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f29512c7048 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f2950703f60 RCX: 00007f2950575bd9
RDX: 0000000020000100 RSI: 00000000800448f0 RDI: 0000000000000004
RBP: 00007f29505e4e60 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007f2950703f60 R15: 00007fffdafed788
Allocated by task 53:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
unpoison_slab_object mm/kasan/common.c:312 [inline]
__kasan_slab_alloc+0x89/0x90 mm/kasan/common.c:338
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook mm/slub.c:3940 [inline]
slab_alloc_node mm/slub.c:4002 [inline]
kmem_cache_alloc_noprof+0x121/0x2f0 mm/slub.c:4009
skb_clone+0x190/0x3f0 net/core/skbuff.c:2052
hci_send_cmd_sync net/bluetooth/hci_core.c:4091 [inline]
hci_cmd_work+0x66a/0x710 net/bluetooth/hci_core.c:4111
process_one_work+0x9c8/0x1b40 kernel/workqueue.c:3248
process_scheduled_works kernel/workqueue.c:3329 [inline]
worker_thread+0x6c8/0xf30 kernel/workqueue.c:3409
kthread+0x2c4/0x3a0 kernel/kthread.c:389
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
Freed by task 53:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:579
poison_slab_object+0xf7/0x160 mm/kasan/common.c:240
__kasan_slab_free+0x32/0x50 mm/kasan/common.c:256
kasan_slab_free include/linux/kasan.h:184 [inline]
slab_free_hook mm/slub.c:2196 [inline]
slab_free mm/slub.c:4438 [inline]
kmem_cache_free+0x12f/0x3a0 mm/slub.c:4513
kfree_skbmem+0x10e/0x200 net/core/skbuff.c:1131
__kfree_skb net/core/skbuff.c:1188 [inline]
kfree_skb_reason+0x138/0x210 net/core/skbuff.c:1223
kfree_skb include/linux/skbuff.h:1257 [inline]
hci_send_cmd_sync net/bluetooth/hci_core.c:4090 [inline]
hci_cmd_work+0x63e/0x710 net/bluetooth/hci_core.c:4111
process_one_work+0x9c8/0x1b40 kernel/workqueue.c:3248
process_scheduled_works kernel/workqueue.c:3329 [inline]
worker_thread+0x6c8/0xf30 kernel/workqueue.c:3409
kthread+0x2c4/0x3a0 kernel/kthread.c:389
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
The buggy address belongs to the object at ffff88807ba2b780
which belongs to the cache skbuff_head_cache of size 240
The buggy address is located 204 bytes inside of
freed 240-byte region [ffff88807ba2b780, ffff88807ba2b870)
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7ba2b
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffefff(slab)
raw: 00fff00000000000 ffff888018eda780 ffffea0001f97b00 dead000000000004
raw: 0000000000000000 00000000000c000c 00000001ffffefff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x172820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_MEMALLOC|__GFP_HARDWALL), pid 1101, tgid 1101 (kworker/u8:6), ts 534994772533, free_ts 534863532906
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1473
prep_new_page mm/page_alloc.c:1481 [inline]
get_page_from_freelist+0x1353/0x2e50 mm/page_alloc.c:3425
__alloc_pages_noprof+0x22b/0x2460 mm/page_alloc.c:4683
__alloc_pages_node_noprof include/linux/gfp.h:269 [inline]
alloc_pages_node_noprof include/linux/gfp.h:296 [inline]
alloc_slab_page+0x56/0x110 mm/slub.c:2265
allocate_slab mm/slub.c:2428 [inline]
new_slab+0x84/0x260 mm/slub.c:2481
___slab_alloc+0xdac/0x1870 mm/slub.c:3667
__slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3757
__slab_alloc_node mm/slub.c:3810 [inline]
slab_alloc_node mm/slub.c:3990 [inline]
kmem_cache_alloc_node_noprof+0xed/0x310 mm/slub.c:4045
__alloc_skb+0x2b1/0x380 net/core/skbuff.c:656
__netdev_alloc_skb+0x72/0x3f0 net/core/skbuff.c:730
__netdev_alloc_skb_ip_align include/linux/skbuff.h:3339 [inline]
netdev_alloc_skb_ip_align include/linux/skbuff.h:3349 [inline]
batadv_iv_ogm_aggregate_new+0x104/0x4a0 net/batman-adv/bat_iv_ogm.c:558
batadv_iv_ogm_queue_add net/batman-adv/bat_iv_ogm.c:670 [inline]
batadv_iv_ogm_schedule_buff+0x99b/0x1500 net/batman-adv/bat_iv_ogm.c:833
batadv_iv_ogm_schedule net/batman-adv/bat_iv_ogm.c:868 [inline]
batadv_iv_ogm_schedule net/batman-adv/bat_iv_ogm.c:861 [inline]
batadv_iv_send_outstanding_bat_ogm_packet+0x31e/0x8d0 net/batman-adv/bat_iv_ogm.c:1712
process_one_work+0x9c8/0x1b40 kernel/workqueue.c:3248
process_scheduled_works kernel/workqueue.c:3329 [inline]
worker_thread+0x6c8/0xf30 kernel/workqueue.c:3409
kthread+0x2c4/0x3a0 kernel/kthread.c:389
page last free pid 8937 tgid 8937 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1093 [inline]
free_unref_page+0x64a/0xe40 mm/page_alloc.c:2588
__put_partials+0x14c/0x170 mm/slub.c:2995
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x4e/0x140 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x192/0x1e0 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:322
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook mm/slub.c:3940 [inline]
slab_alloc_node mm/slub.c:4002 [inline]
kmalloc_trace_noprof+0x11e/0x300 mm/slub.c:4149
kmalloc_noprof include/linux/slab.h:660 [inline]
kzalloc_noprof include/linux/slab.h:778 [inline]
kernfs_fop_open+0x28b/0xdb0 fs/kernfs/file.c:623
do_dentry_open+0x922/0x15f0 fs/open.c:955
vfs_open+0x82/0x3f0 fs/open.c:1086
do_open fs/namei.c:3654 [inline]
path_openat+0x21fc/0x2e50 fs/namei.c:3813
do_filp_open+0x1dc/0x430 fs/namei.c:3840
do_sys_openat2+0x17a/0x1e0 fs/open.c:1413
do_sys_open fs/open.c:1428 [inline]
__do_sys_openat fs/open.c:1444 [inline]
__se_sys_openat fs/open.c:1439 [inline]
__x64_sys_openat+0x175/0x210 fs/open.c:1439
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff88807ba2b700: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc
ffff88807ba2b780: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88807ba2b800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc
^
ffff88807ba2b880: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
ffff88807ba2b900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
==================================================================
BUG: KASAN: slab-use-after-free in skb_data_unref include/linux/skbuff.h:1235 [inline]
BUG: KASAN: slab-use-after-free in skb_release_data+0x806/0x980 net/core/skbuff.c:1090
Read of size 1 at addr ffff88807ba2b7fe by task syz.0.2308/14291
CPU: 0 PID: 14291 Comm: syz.0.2308 Tainted: G B 6.10.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114
print_address_description mm/kasan/report.c:377 [inline]
print_report+0xc3/0x620 mm/kasan/report.c:488
kasan_report+0xd9/0x110 mm/kasan/report.c:601
skb_data_unref include/linux/skbuff.h:1235 [inline]
skb_release_data+0x806/0x980 net/core/skbuff.c:1090
skb_release_all net/core/skbuff.c:1173 [inline]
__kfree_skb net/core/skbuff.c:1187 [inline]
kfree_skb_reason+0x12b/0x210 net/core/skbuff.c:1223
kfree_skb include/linux/skbuff.h:1257 [inline]
__hci_req_sync+0x61d/0x980 net/bluetooth/hci_request.c:184
hci_req_sync+0x97/0xd0 net/bluetooth/hci_request.c:206
hci_inquiry+0x3ea/0x950 net/bluetooth/hci_core.c:383
hci_sock_ioctl+0x2bb/0x880 net/bluetooth/hci_sock.c:1153
sock_do_ioctl+0x119/0x280 net/socket.c:1222
sock_ioctl+0x22e/0x6c0 net/socket.c:1341
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:907 [inline]
__se_sys_ioctl fs/ioctl.c:893 [inline]
__x64_sys_ioctl+0x196/0x220 fs/ioctl.c:893
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f2950575bd9
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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f29512c7048 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f2950703f60 RCX: 00007f2950575bd9
RDX: 0000000020000100 RSI: 00000000800448f0 RDI: 0000000000000004
RBP: 00007f29505e4e60 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007f2950703f60 R15: 00007fffdafed788
Allocated by task 53:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
unpoison_slab_object mm/kasan/common.c:312 [inline]
__kasan_slab_alloc+0x89/0x90 mm/kasan/common.c:338
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook mm/slub.c:3940 [inline]
slab_alloc_node mm/slub.c:4002 [inline]
kmem_cache_alloc_noprof+0x121/0x2f0 mm/slub.c:4009
skb_clone+0x190/0x3f0 net/core/skbuff.c:2052
hci_send_cmd_sync net/bluetooth/hci_core.c:4091 [inline]
hci_cmd_work+0x66a/0x710 net/bluetooth/hci_core.c:4111
process_one_work+0x9c8/0x1b40 kernel/workqueue.c:3248
process_scheduled_works kernel/workqueue.c:3329 [inline]
worker_thread+0x6c8/0xf30 kernel/workqueue.c:3409
kthread+0x2c4/0x3a0 kernel/kthread.c:389
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
Freed by task 53:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:579
poison_slab_object+0xf7/0x160 mm/kasan/common.c:240
__kasan_slab_free+0x32/0x50 mm/kasan/common.c:256
kasan_slab_free include/linux/kasan.h:184 [inline]
slab_free_hook mm/slub.c:2196 [inline]
slab_free mm/slub.c:4438 [inline]
kmem_cache_free+0x12f/0x3a0 mm/slub.c:4513
kfree_skbmem+0x10e/0x200 net/core/skbuff.c:1131
__kfree_skb net/core/skbuff.c:1188 [inline]
kfree_skb_reason+0x138/0x210 net/core/skbuff.c:1223
kfree_skb include/linux/skbuff.h:1257 [inline]
hci_send_cmd_sync net/bluetooth/hci_core.c:4090 [inline]
hci_cmd_work+0x63e/0x710 net/bluetooth/hci_core.c:4111
process_one_work+0x9c8/0x1b40 kernel/workqueue.c:3248
process_scheduled_works kernel/workqueue.c:3329 [inline]
worker_thread+0x6c8/0xf30 kernel/workqueue.c:3409
kthread+0x2c4/0x3a0 kernel/kthread.c:389
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
The buggy address belongs to the object at ffff88807ba2b780
which belongs to the cache skbuff_head_cache of size 240
The buggy address is located 126 bytes inside of
freed 240-byte region [ffff88807ba2b780, ffff88807ba2b870)
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7ba2b
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffefff(slab)
raw: 00fff00000000000 ffff888018eda780 ffffea0001f97b00 dead000000000004
raw: 0000000000000000 00000000000c000c 00000001ffffefff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x172820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_MEMALLOC|__GFP_HARDWALL), pid 1101, tgid 1101 (kworker/u8:6), ts 534994772533, free_ts 534863532906
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1473
prep_new_page mm/page_alloc.c:1481 [inline]
get_page_from_freelist+0x1353/0x2e50 mm/page_alloc.c:3425
__alloc_pages_noprof+0x22b/0x2460 mm/page_alloc.c:4683
__alloc_pages_node_noprof include/linux/gfp.h:269 [inline]
alloc_pages_node_noprof include/linux/gfp.h:296 [inline]
alloc_slab_page+0x56/0x110 mm/slub.c:2265
allocate_slab mm/slub.c:2428 [inline]
new_slab+0x84/0x260 mm/slub.c:2481
___slab_alloc+0xdac/0x1870 mm/slub.c:3667
__slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3757
__slab_alloc_node mm/slub.c:3810 [inline]
slab_alloc_node mm/slub.c:3990 [inline]
kmem_cache_alloc_node_noprof+0xed/0x310 mm/slub.c:4045
__alloc_skb+0x2b1/0x380 net/core/skbuff.c:656
__netdev_alloc_skb+0x72/0x3f0 net/core/skbuff.c:730
__netdev_alloc_skb_ip_align include/linux/skbuff.h:3339 [inline]
netdev_alloc_skb_ip_align include/linux/skbuff.h:3349 [inline]
batadv_iv_ogm_aggregate_new+0x104/0x4a0 net/batman-adv/bat_iv_ogm.c:558
batadv_iv_ogm_queue_add net/batman-adv/bat_iv_ogm.c:670 [inline]
batadv_iv_ogm_schedule_buff+0x99b/0x1500 net/batman-adv/bat_iv_ogm.c:833
batadv_iv_ogm_schedule net/batman-adv/bat_iv_ogm.c:868 [inline]
batadv_iv_ogm_schedule net/batman-adv/bat_iv_ogm.c:861 [inline]
batadv_iv_send_outstanding_bat_ogm_packet+0x31e/0x8d0 net/batman-adv/bat_iv_ogm.c:1712
process_one_work+0x9c8/0x1b40 kernel/workqueue.c:3248
process_scheduled_works kernel/workqueue.c:3329 [inline]
worker_thread+0x6c8/0xf30 kernel/workqueue.c:3409
kthread+0x2c4/0x3a0 kernel/kthread.c:389
page last free pid 8937 tgid 8937 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1093 [inline]
free_unref_page+0x64a/0xe40 mm/page_alloc.c:2588
__put_partials+0x14c/0x170 mm/slub.c:2995
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x4e/0x140 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x192/0x1e0 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:322
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook mm/slub.c:3940 [inline]
slab_alloc_node mm/slub.c:4002 [inline]
kmalloc_trace_noprof+0x11e/0x300 mm/slub.c:4149
kmalloc_noprof include/linux/slab.h:660 [inline]
kzalloc_noprof include/linux/slab.h:778 [inline]
kernfs_fop_open+0x28b/0xdb0 fs/kernfs/file.c:623
do_dentry_open+0x922/0x15f0 fs/open.c:955
vfs_open+0x82/0x3f0 fs/open.c:1086
do_open fs/namei.c:3654 [inline]
path_openat+0x21fc/0x2e50 fs/namei.c:3813
do_filp_open+0x1dc/0x430 fs/namei.c:3840
do_sys_openat2+0x17a/0x1e0 fs/open.c:1413
do_sys_open fs/open.c:1428 [inline]
__do_sys_openat fs/open.c:1444 [inline]
__se_sys_openat fs/open.c:1439 [inline]
__x64_sys_openat+0x175/0x210 fs/open.c:1439
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff88807ba2b680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88807ba2b700: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc
>ffff88807ba2b780: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88807ba2b800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc
ffff88807ba2b880: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
==================================================================
==================================================================
BUG: KASAN: slab-use-after-free in skb_end_pointer include/linux/skbuff.h:1640 [inline]
BUG: KASAN: slab-use-after-free in skb_zcopy include/linux/skbuff.h:1700 [inline]
BUG: KASAN: slab-use-after-free in skb_release_data+0x8dd/0x980 net/core/skbuff.c:1093
Read of size 8 at addr ffff88807ba2b850 by task syz.0.2308/14291
CPU: 0 PID: 14291 Comm: syz.0.2308 Tainted: G B 6.10.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114
print_address_description mm/kasan/report.c:377 [inline]
print_report+0xc3/0x620 mm/kasan/report.c:488
kasan_report+0xd9/0x110 mm/kasan/report.c:601
skb_end_pointer include/linux/skbuff.h:1640 [inline]
skb_zcopy include/linux/skbuff.h:1700 [inline]
skb_release_data+0x8dd/0x980 net/core/skbuff.c:1093
skb_release_all net/core/skbuff.c:1173 [inline]
__kfree_skb net/core/skbuff.c:1187 [inline]
kfree_skb_reason+0x12b/0x210 net/core/skbuff.c:1223
kfree_skb include/linux/skbuff.h:1257 [inline]
__hci_req_sync+0x61d/0x980 net/bluetooth/hci_request.c:184
hci_req_sync+0x97/0xd0 net/bluetooth/hci_request.c:206
hci_inquiry+0x3ea/0x950 net/bluetooth/hci_core.c:383
hci_sock_ioctl+0x2bb/0x880 net/bluetooth/hci_sock.c:1153
sock_do_ioctl+0x119/0x280 net/socket.c:1222
sock_ioctl+0x22e/0x6c0 net/socket.c:1341
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:907 [inline]
__se_sys_ioctl fs/ioctl.c:893 [inline]
__x64_sys_ioctl+0x196/0x220 fs/ioctl.c:893
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f2950575bd9
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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f29512c7048 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f2950703f60 RCX: 00007f2950575bd9
RDX: 0000000020000100 RSI: 00000000800448f0 RDI: 0000000000000004
RBP: 00007f29505e4e60 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007f2950703f60 R15: 00007fffdafed788
Allocated by task 53:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
unpoison_slab_object mm/kasan/common.c:312 [inline]
__kasan_slab_alloc+0x89/0x90 mm/kasan/common.c:338
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook mm/slub.c:3940 [inline]
slab_alloc_node mm/slub.c:4002 [inline]
kmem_cache_alloc_noprof+0x121/0x2f0 mm/slub.c:4009
skb_clone+0x190/0x3f0 net/core/skbuff.c:2052
hci_send_cmd_sync net/bluetooth/hci_core.c:4091 [inline]
hci_cmd_work+0x66a/0x710 net/bluetooth/hci_core.c:4111
process_one_work+0x9c8/0x1b40 kernel/workqueue.c:3248
process_scheduled_works kernel/workqueue.c:3329 [inline]
worker_thread+0x6c8/0xf30 kernel/workqueue.c:3409
kthread+0x2c4/0x3a0 kernel/kthread.c:389
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
Freed by task 53:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:579
poison_slab_object+0xf7/0x160 mm/kasan/common.c:240
__kasan_slab_free+0x32/0x50 mm/kasan/common.c:256
kasan_slab_free include/linux/kasan.h:184 [inline]
slab_free_hook mm/slub.c:2196 [inline]
slab_free mm/slub.c:4438 [inline]
kmem_cache_free+0x12f/0x3a0 mm/slub.c:4513
kfree_skbmem+0x10e/0x200 net/core/skbuff.c:1131
__kfree_skb net/core/skbuff.c:1188 [inline]
kfree_skb_reason+0x138/0x210 net/core/skbuff.c:1223
kfree_skb include/linux/skbuff.h:1257 [inline]
hci_send_cmd_sync net/bluetooth/hci_core.c:4090 [inline]
hci_cmd_work+0x63e/0x710 net/bluetooth/hci_core.c:4111
process_one_work+0x9c8/0x1b40 kernel/workqueue.c:3248
process_scheduled_works kernel/workqueue.c:3329 [inline]
worker_thread+0x6c8/0xf30 kernel/workqueue.c:3409
kthread+0x2c4/0x3a0 kernel/kthread.c:389
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
The buggy address belongs to the object at ffff88807ba2b780
which belongs to the cache skbuff_head_cache of size 240
The buggy address is located 208 bytes inside of
freed 240-byte region [ffff88807ba2b780, ffff88807ba2b870)
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7ba2b
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffefff(slab)
raw: 00fff00000000000 ffff888018eda780 ffffea0001f97b00 dead000000000004
raw: 0000000000000000 00000000000c000c 00000001ffffefff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x172820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_MEMALLOC|__GFP_HARDWALL), pid 1101, tgid 1101 (kworker/u8:6), ts 534994772533, free_ts 534863532906
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1473
prep_new_page mm/page_alloc.c:1481 [inline]
get_page_from_freelist+0x1353/0x2e50 mm/page_alloc.c:3425
__alloc_pages_noprof+0x22b/0x2460 mm/page_alloc.c:4683
__alloc_pages_node_noprof include/linux/gfp.h:269 [inline]
alloc_pages_node_noprof include/linux/gfp.h:296 [inline]
alloc_slab_page+0x56/0x110 mm/slub.c:2265
allocate_slab mm/slub.c:2428 [inline]
new_slab+0x84/0x260 mm/slub.c:2481
___slab_alloc+0xdac/0x1870 mm/slub.c:3667
__slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3757
__slab_alloc_node mm/slub.c:3810 [inline]
slab_alloc_node mm/slub.c:3990 [inline]
kmem_cache_alloc_node_noprof+0xed/0x310 mm/slub.c:4045
__alloc_skb+0x2b1/0x380 net/core/skbuff.c:656
__netdev_alloc_skb+0x72/0x3f0 net/core/skbuff.c:730
__netdev_alloc_skb_ip_align include/linux/skbuff.h:3339 [inline]
netdev_alloc_skb_ip_align include/linux/skbuff.h:3349 [inline]
batadv_iv_ogm_aggregate_new+0x104/0x4a0 net/batman-adv/bat_iv_ogm.c:558
batadv_iv_ogm_queue_add net/batman-adv/bat_iv_ogm.c:670 [inline]
batadv_iv_ogm_schedule_buff+0x99b/0x1500 net/batman-adv/bat_iv_ogm.c:833
batadv_iv_ogm_schedule net/batman-adv/bat_iv_ogm.c:868 [inline]
batadv_iv_ogm_schedule net/batman-adv/bat_iv_ogm.c:861 [inline]
batadv_iv_send_outstanding_bat_ogm_packet+0x31e/0x8d0 net/batman-adv/bat_iv_ogm.c:1712
process_one_work+0x9c8/0x1b40 kernel/workqueue.c:3248
process_scheduled_works kernel/workqueue.c:3329 [inline]
worker_thread+0x6c8/0xf30 kernel/workqueue.c:3409
kthread+0x2c4/0x3a0 kernel/kthread.c:389
page last free pid 8937 tgid 8937 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1093 [inline]
free_unref_page+0x64a/0xe40 mm/page_alloc.c:2588
__put_partials+0x14c/0x170 mm/slub.c:2995
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x4e/0x140 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x192/0x1e0 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:322
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook mm/slub.c:3940 [inline]
slab_alloc_node mm/slub.c:4002 [inline]
kmalloc_trace_noprof+0x11e/0x300 mm/slub.c:4149
kmalloc_noprof include/linux/slab.h:660 [inline]
kzalloc_noprof include/linux/slab.h:778 [inline]
kernfs_fop_open+0x28b/0xdb0 fs/kernfs/file.c:623
do_dentry_open+0x922/0x15f0 fs/open.c:955
vfs_open+0x82/0x3f0 fs/open.c:1086
do_open fs/namei.c:3654 [inline]
path_openat+0x21fc/0x2e50 fs/namei.c:3813
do_filp_open+0x1dc/0x430 fs/namei.c:3840
do_sys_openat2+0x17a/0x1e0 fs/open.c:1413
do_sys_open fs/open.c:1428 [inline]
__do_sys_openat fs/open.c:1444 [inline]
__se_sys_openat fs/open.c:1439 [inline]
__x64_sys_openat+0x175/0x210 fs/open.c:1439
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff88807ba2b700: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc
ffff88807ba2b780: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88807ba2b800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc
^
ffff88807ba2b880: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
ffff88807ba2b900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
==================================================================
BUG: KASAN: slab-use-after-free in skb_end_pointer include/linux/skbuff.h:1640 [inline]
BUG: KASAN: slab-use-after-free in skb_zcopy include/linux/skbuff.h:1700 [inline]
BUG: KASAN: slab-use-after-free in skb_release_data+0x857/0x980 net/core/skbuff.c:1093
Read of size 4 at addr ffff88807ba2b84c by task syz.0.2308/14291
CPU: 1 PID: 14291 Comm: syz.0.2308 Tainted: G B 6.10.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114
print_address_description mm/kasan/report.c:377 [inline]
print_report+0xc3/0x620 mm/kasan/report.c:488
kasan_report+0xd9/0x110 mm/kasan/report.c:601
skb_end_pointer include/linux/skbuff.h:1640 [inline]
skb_zcopy include/linux/skbuff.h:1700 [inline]
skb_release_data+0x857/0x980 net/core/skbuff.c:1093
skb_release_all net/core/skbuff.c:1173 [inline]
__kfree_skb net/core/skbuff.c:1187 [inline]
kfree_skb_reason+0x12b/0x210 net/core/skbuff.c:1223
kfree_skb include/linux/skbuff.h:1257 [inline]
__hci_req_sync+0x61d/0x980 net/bluetooth/hci_request.c:184
hci_req_sync+0x97/0xd0 net/bluetooth/hci_request.c:206
hci_inquiry+0x3ea/0x950 net/bluetooth/hci_core.c:383
hci_sock_ioctl+0x2bb/0x880 net/bluetooth/hci_sock.c:1153
sock_do_ioctl+0x119/0x280 net/socket.c:1222
sock_ioctl+0x22e/0x6c0 net/socket.c:1341
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:907 [inline]
__se_sys_ioctl fs/ioctl.c:893 [inline]
__x64_sys_ioctl+0x196/0x220 fs/ioctl.c:893
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f2950575bd9
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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f29512c7048 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f2950703f60 RCX: 00007f2950575bd9
RDX: 0000000020000100 RSI: 00000000800448f0 RDI: 0000000000000004
RBP: 00007f29505e4e60 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007f2950703f60 R15: 00007fffdafed788
Allocated by task 53:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
unpoison_slab_object mm/kasan/common.c:312 [inline]
__kasan_slab_alloc+0x89/0x90 mm/kasan/common.c:338
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook mm/slub.c:3940 [inline]
slab_alloc_node mm/slub.c:4002 [inline]
kmem_cache_alloc_noprof+0x121/0x2f0 mm/slub.c:4009
skb_clone+0x190/0x3f0 net/core/skbuff.c:2052
hci_send_cmd_sync net/bluetooth/hci_core.c:4091 [inline]
hci_cmd_work+0x66a/0x710 net/bluetooth/hci_core.c:4111
process_one_work+0x9c8/0x1b40 kernel/workqueue.c:3248
process_scheduled_works kernel/workqueue.c:3329 [inline]
worker_thread+0x6c8/0xf30 kernel/workqueue.c:3409
kthread+0x2c4/0x3a0 kernel/kthread.c:389
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
Freed by task 53:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:579
poison_slab_object+0xf7/0x160 mm/kasan/common.c:240
__kasan_slab_free+0x32/0x50 mm/kasan/common.c:256
kasan_slab_free include/linux/kasan.h:184 [inline]
slab_free_hook mm/slub.c:2196 [inline]
slab_free mm/slub.c:4438 [inline]
kmem_cache_free+0x12f/0x3a0 mm/slub.c:4513
kfree_skbmem+0x10e/0x200 net/core/skbuff.c:1131
__kfree_skb net/core/skbuff.c:1188 [inline]
kfree_skb_reason+0x138/0x210 net/core/skbuff.c:1223
kfree_skb include/linux/skbuff.h:1257 [inline]
hci_send_cmd_sync net/bluetooth/hci_core.c:4090 [inline]
hci_cmd_work+0x63e/0x710 net/bluetooth/hci_core.c:4111
process_one_work+0x9c8/0x1b40 kernel/workqueue.c:3248
process_scheduled_works kernel/workqueue.c:3329 [inline]
worker_thread+0x6c8/0xf30 kernel/workqueue.c:3409
kthread+0x2c4/0x3a0 kernel/kthread.c:389
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
The buggy address belongs to the object at ffff88807ba2b780
which belongs to the cache skbuff_head_cache of size 240
The buggy address is located 204 bytes inside of
freed 240-byte region [ffff88807ba2b780, ffff88807ba2b870)
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7ba2b
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffefff(slab)
raw: 00fff00000000000 ffff888018eda780 ffffea0001f97b00 dead000000000004
raw: 0000000000000000 00000000000c000c 00000001ffffefff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x172820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_MEMALLOC|__GFP_HARDWALL), pid 1101, tgid 1101 (kworker/u8:6), ts 534994772533, free_ts 534863532906
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1473
prep_new_page mm/page_alloc.c:1481 [inline]
get_page_from_freelist+0x1353/0x2e50 mm/page_alloc.c:3425
__alloc_pages_noprof+0x22b/0x2460 mm/page_alloc.c:4683
__alloc_pages_node_noprof include/linux/gfp.h:269 [inline]
alloc_pages_node_noprof include/linux/gfp.h:296 [inline]
alloc_slab_page+0x56/0x110 mm/slub.c:2265
allocate_slab mm/slub.c:2428 [inline]
new_slab+0x84/0x260 mm/slub.c:2481
___slab_alloc+0xdac/0x1870 mm/slub.c:3667
__slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3757
__slab_alloc_node mm/slub.c:3810 [inline]
slab_alloc_node mm/slub.c:3990 [inline]
kmem_cache_alloc_node_noprof+0xed/0x310 mm/slub.c:4045
__alloc_skb+0x2b1/0x380 net/core/skbuff.c:656
__netdev_alloc_skb+0x72/0x3f0 net/core/skbuff.c:730
__netdev_alloc_skb_ip_align include/linux/skbuff.h:3339 [inline]
netdev_alloc_skb_ip_align include/linux/skbuff.h:3349 [inline]
batadv_iv_ogm_aggregate_new+0x104/0x4a0 net/batman-adv/bat_iv_ogm.c:558
batadv_iv_ogm_queue_add net/batman-adv/bat_iv_ogm.c:670 [inline]
batadv_iv_ogm_schedule_buff+0x99b/0x1500 net/batman-adv/bat_iv_ogm.c:833
batadv_iv_ogm_schedule net/batman-adv/bat_iv_ogm.c:868 [inline]
batadv_iv_ogm_schedule net/batman-adv/bat_iv_ogm.c:861 [inline]
batadv_iv_send_outstanding_bat_ogm_packet+0x31e/0x8d0 net/batman-adv/bat_iv_ogm.c:1712
process_one_work+0x9c8/0x1b40 kernel/workqueue.c:3248
process_scheduled_works kernel/workqueue.c:3329 [inline]
worker_thread+0x6c8/0xf30 kernel/workqueue.c:3409
kthread+0x2c4/0x3a0 kernel/kthread.c:389
page last free pid 8937 tgid 8937 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1093 [inline]
free_unref_page+0x64a/0xe40 mm/page_alloc.c:2588
__put_partials+0x14c/0x170 mm/slub.c:2995
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x4e/0x140 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x192/0x1e0 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:322
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook mm/slub.c:3940 [inline]
slab_alloc_node mm/slub.c:4002 [inline]
kmalloc_trace_noprof+0x11e/0x300 mm/slub.c:4149
kmalloc_noprof include/linux/slab.h:660 [inline]
kzalloc_noprof include/linux/slab.h:778 [inline]
kernfs_fop_open+0x28b/0xdb0 fs/kernfs/file.c:623
do_dentry_open+0x922/0x15f0 fs/open.c:955
vfs_open+0x82/0x3f0 fs/open.c:1086
do_open fs/namei.c:3654 [inline]
path_openat+0x21fc/0x2e50 fs/namei.c:3813
do_filp_open+0x1dc/0x430 fs/namei.c:3840
do_sys_openat2+0x17a/0x1e0 fs/open.c:1413
do_sys_open fs/open.c:1428 [inline]
__do_sys_openat fs/open.c:1444 [inline]
__se_sys_openat fs/open.c:1439 [inline]
__x64_sys_openat+0x175/0x210 fs/open.c:1439
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff88807ba2b700: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc
ffff88807ba2b780: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88807ba2b800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc
^
ffff88807ba2b880: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
ffff88807ba2b900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
==================================================================
BUG: KASAN: slab-use-after-free in skb_free_head+0x1ae/0x1d0 net/core/skbuff.c:1074
Read of size 8 at addr ffff88807ba2b850 by task syz.0.2308/14291
CPU: 0 PID: 14291 Comm: syz.0.2308 Tainted: G B 6.10.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114
print_address_description mm/kasan/report.c:377 [inline]
print_report+0xc3/0x620 mm/kasan/report.c:488
kasan_report+0xd9/0x110 mm/kasan/report.c:601
skb_free_head+0x1ae/0x1d0 net/core/skbuff.c:1074
skb_release_data+0x75c/0x980 net/core/skbuff.c:1108
skb_release_all net/core/skbuff.c:1173 [inline]
__kfree_skb net/core/skbuff.c:1187 [inline]
kfree_skb_reason+0x12b/0x210 net/core/skbuff.c:1223
kfree_skb include/linux/skbuff.h:1257 [inline]
__hci_req_sync+0x61d/0x980 net/bluetooth/hci_request.c:184
hci_req_sync+0x97/0xd0 net/bluetooth/hci_request.c:206
hci_inquiry+0x3ea/0x950 net/bluetooth/hci_core.c:383
hci_sock_ioctl+0x2bb/0x880 net/bluetooth/hci_sock.c:1153
sock_do_ioctl+0x119/0x280 net/socket.c:1222
sock_ioctl+0x22e/0x6c0 net/socket.c:1341
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:907 [inline]
__se_sys_ioctl fs/ioctl.c:893 [inline]
__x64_sys_ioctl+0x196/0x220 fs/ioctl.c:893
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f2950575bd9
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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f29512c7048 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f2950703f60 RCX: 00007f2950575bd9
RDX: 0000000020000100 RSI: 00000000800448f0 RDI: 0000000000000004
RBP: 00007f29505e4e60 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007f2950703f60 R15: 00007fffdafed788
Allocated by task 53:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
unpoison_slab_object mm/kasan/common.c:312 [inline]
__kasan_slab_alloc+0x89/0x90 mm/kasan/common.c:338
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook mm/slub.c:3940 [inline]
slab_alloc_node mm/slub.c:4002 [inline]
kmem_cache_alloc_noprof+0x121/0x2f0 mm/slub.c:4009
skb_clone+0x190/0x3f0 net/core/skbuff.c:2052
hci_send_cmd_sync net/bluetooth/hci_core.c:4091 [inline]
hci_cmd_work+0x66a/0x710 net/bluetooth/hci_core.c:4111
process_one_work+0x9c8/0x1b40 kernel/workqueue.c:3248
process_scheduled_works kernel/workqueue.c:3329 [inline]
worker_thread+0x6c8/0xf30 kernel/workqueue.c:3409
kthread+0x2c4/0x3a0 kernel/kthread.c:389
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
Freed by task 53:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:579
poison_slab_object+0xf7/0x160 mm/kasan/common.c:240
__kasan_slab_free+0x32/0x50 mm/kasan/common.c:256
kasan_slab_free include/linux/kasan.h:184 [inline]
slab_free_hook mm/slub.c:2196 [inline]
slab_free mm/slub.c:4438 [inline]
kmem_cache_free+0x12f/0x3a0 mm/slub.c:4513
kfree_skbmem+0x10e/0x200 net/core/skbuff.c:1131
__kfree_skb net/core/skbuff.c:1188 [inline]
kfree_skb_reason+0x138/0x210 net/core/skbuff.c:1223
kfree_skb include/linux/skbuff.h:1257 [inline]
hci_send_cmd_sync net/bluetooth/hci_core.c:4090 [inline]
hci_cmd_work+0x63e/0x710 net/bluetooth/hci_core.c:4111
process_one_work+0x9c8/0x1b40 kernel/workqueue.c:3248
process_scheduled_works kernel/workqueue.c:3329 [inline]
worker_thread+0x6c8/0xf30 kernel/workqueue.c:3409
kthread+0x2c4/0x3a0 kernel/kthread.c:389
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
The buggy address belongs to the object at ffff88807ba2b780
which belongs to the cache skbuff_head_cache of size 240
The buggy address is located 208 bytes inside of
freed 240-byte region [ffff88807ba2b780, ffff88807ba2b870)
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7ba2b
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffefff(slab)
raw: 00fff00000000000 ffff888018eda780 ffffea0001f97b00 dead000000000004
raw: 0000000000000000 00000000000c000c 00000001ffffefff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x172820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_MEMALLOC|__GFP_HARDWALL), pid 1101, tgid 1101 (kworker/u8:6), ts 534994772533, free_ts 534863532906
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1473
prep_new_page mm/page_alloc.c:1481 [inline]
get_page_from_freelist+0x1353/0x2e50 mm/page_alloc.c:3425
__alloc_pages_noprof+0x22b/0x2460 mm/page_alloc.c:4683
__alloc_pages_node_noprof include/linux/gfp.h:269 [inline]
alloc_pages_node_noprof include/linux/gfp.h:296 [inline]
alloc_slab_page+0x56/0x110 mm/slub.c:2265
allocate_slab mm/slub.c:2428 [inline]
new_slab+0x84/0x260 mm/slub.c:2481
___slab_alloc+0xdac/0x1870 mm/slub.c:3667
__slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3757
__slab_alloc_node mm/slub.c:3810 [inline]
slab_alloc_node mm/slub.c:3990 [inline]
kmem_cache_alloc_node_noprof+0xed/0x310 mm/slub.c:4045
__alloc_skb+0x2b1/0x380 net/core/skbuff.c:656
__netdev_alloc_skb+0x72/0x3f0 net/core/skbuff.c:730
__netdev_alloc_skb_ip_align include/linux/skbuff.h:3339 [inline]
netdev_alloc_skb_ip_align include/linux/skbuff.h:3349 [inline]
batadv_iv_ogm_aggregate_new+0x104/0x4a0 net/batman-adv/bat_iv_ogm.c:558
batadv_iv_ogm_queue_add net/batman-adv/bat_iv_ogm.c:670 [inline]
batadv_iv_ogm_schedule_buff+0x99b/0x1500 net/batman-adv/bat_iv_ogm.c:833
batadv_iv_ogm_schedule net/batman-adv/bat_iv_ogm.c:868 [inline]
batadv_iv_ogm_schedule net/batman-adv/bat_iv_ogm.c:861 [inline]
batadv_iv_send_outstanding_bat_ogm_packet+0x31e/0x8d0 net/batman-adv/bat_iv_ogm.c:1712
process_one_work+0x9c8/0x1b40 kernel/workqueue.c:3248
process_scheduled_works kernel/workqueue.c:3329 [inline]
worker_thread+0x6c8/0xf30 kernel/workqueue.c:3409
kthread+0x2c4/0x3a0 kernel/kthread.c:389
page last free pid 8937 tgid 8937 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1093 [inline]
free_unref_page+0x64a/0xe40 mm/page_alloc.c:2588
__put_partials+0x14c/0x170 mm/slub.c:2995
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x4e/0x140 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x192/0x1e0 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:322
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook mm/slub.c:3940 [inline]
slab_alloc_node mm/slub.c:4002 [inline]
kmalloc_trace_noprof+0x11e/0x300 mm/slub.c:4149
kmalloc_noprof include/linux/slab.h:660 [inline]
kzalloc_noprof include/linux/slab.h:778 [inline]
kernfs_fop_open+0x28b/0xdb0 fs/kernfs/file.c:623
do_dentry_open+0x922/0x15f0 fs/open.c:955
vfs_open+0x82/0x3f0 fs/open.c:1086
do_open fs/namei.c:3654 [inline]
path_openat+0x21fc/0x2e50 fs/namei.c:3813
do_filp_open+0x1dc/0x430 fs/namei.c:3840
do_sys_openat2+0x17a/0x1e0 fs/open.c:1413
do_sys_open fs/open.c:1428 [inline]
__do_sys_openat fs/open.c:1444 [inline]
__se_sys_openat fs/open.c:1439 [inline]
__x64_sys_openat+0x175/0x210 fs/open.c:1439
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff88807ba2b700: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc
ffff88807ba2b780: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88807ba2b800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc
^
ffff88807ba2b880: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
ffff88807ba2b900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
==================================================================
BUG: KASAN: slab-use-after-free in skb_free_head+0x19a/0x1d0 net/core/skbuff.c:1076
Read of size 1 at addr ffff88807ba2b7fe by task syz.0.2308/14291
CPU: 1 PID: 14291 Comm: syz.0.2308 Tainted: G B 6.10.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114
print_address_description mm/kasan/report.c:377 [inline]
print_report+0xc3/0x620 mm/kasan/report.c:488
kasan_report+0xd9/0x110 mm/kasan/report.c:601
skb_free_head+0x19a/0x1d0 net/core/skbuff.c:1076
skb_release_data+0x75c/0x980 net/core/skbuff.c:1108
skb_release_all net/core/skbuff.c:1173 [inline]
__kfree_skb net/core/skbuff.c:1187 [inline]
kfree_skb_reason+0x12b/0x210 net/core/skbuff.c:1223
kfree_skb include/linux/skbuff.h:1257 [inline]
__hci_req_sync+0x61d/0x980 net/bluetooth/hci_request.c:184
hci_req_sync+0x97/0xd0 net/bluetooth/hci_request.c:206
hci_inquiry+0x3ea/0x950 net/bluetooth/hci_core.c:383
hci_sock_ioctl+0x2bb/0x880 net/bluetooth/hci_sock.c:1153
sock_do_ioctl+0x119/0x280 net/socket.c:1222
sock_ioctl+0x22e/0x6c0 net/socket.c:1341
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:907 [inline]
__se_sys_ioctl fs/ioctl.c:893 [inline]
__x64_sys_ioctl+0x196/0x220 fs/ioctl.c:893
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f2950575bd9
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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f29512c7048 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f2950703f60 RCX: 00007f2950575bd9
RDX: 0000000020000100 RSI: 00000000800448f0 RDI: 0000000000000004
RBP: 00007f29505e4e60 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007f2950703f60 R15: 00007fffdafed788
Allocated by task 53:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
unpoison_slab_object mm/kasan/common.c:312 [inline]
__kasan_slab_alloc+0x89/0x90 mm/kasan/common.c:338
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook mm/slub.c:3940 [inline]
slab_alloc_node mm/slub.c:4002 [inline]
kmem_cache_alloc_noprof+0x121/0x2f0 mm/slub.c:4009
skb_clone+0x190/0x3f0 net/core/skbuff.c:2052
hci_send_cmd_sync net/bluetooth/hci_core.c:4091 [inline]
hci_cmd_work+0x66a/0x710 net/bluetooth/hci_core.c:4111
process_one_work+0x9c8/0x1b40 kernel/workqueue.c:3248
process_scheduled_works kernel/workqueue.c:3329 [inline]
worker_thread+0x6c8/0xf30 kernel/workqueue.c:3409
kthread+0x2c4/0x3a0 kernel/kthread.c:389
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
Freed by task 53:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:579
poison_slab_object+0xf7/0x160 mm/kasan/common.c:240
__kasan_slab_free+0x32/0x50 mm/kasan/common.c:256
kasan_slab_free include/linux/kasan.h:184 [inline]
slab_free_hook mm/slub.c:2196 [inline]
slab_free mm/slub.c:4438 [inline]
kmem_cache_free+0x12f/0x3a0 mm/slub.c:4513
kfree_skbmem+0x10e/0x200 net/core/skbuff.c:1131
__kfree_skb net/core/skbuff.c:1188 [inline]
kfree_skb_reason+0x138/0x210 net/core/skbuff.c:1223
kfree_skb include/linux/skbuff.h:1257 [inline]
hci_send_cmd_sync net/bluetooth/hci_core.c:4090 [inline]
hci_cmd_work+0x63e/0x710 net/bluetooth/hci_core.c:4111
process_one_work+0x9c8/0x1b40 kernel/workqueue.c:3248
process_scheduled_works kernel/workqueue.c:3329 [inline]
worker_thread+0x6c8/0xf30 kernel/workqueue.c:3409
kthread+0x2c4/0x3a0 kernel/kthread.c:389
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
The buggy address belongs to the object at ffff88807ba2b780
which belongs to the cache skbuff_head_cache of size 240
The buggy address is located 126 bytes inside of
freed 240-byte region [ffff88807ba2b780, ffff88807ba2b870)
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7ba2b
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffefff(slab)
raw: 00fff00000000000 ffff888018eda780 ffffea0001f97b00 dead000000000004
raw: 0000000000000000 00000000000c000c 00000001ffffefff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x172820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_MEMALLOC|__GFP_HARDWALL), pid 1101, tgid 1101 (kworker/u8:6), ts 534994772533, free_ts 534863532906
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1473
prep_new_page mm/page_alloc.c:1481 [inline]
get_page_from_freelist+0x1353/0x2e50 mm/page_alloc.c:3425
__alloc_pages_noprof+0x22b/0x2460 mm/page_alloc.c:4683
__alloc_pages_node_noprof include/linux/gfp.h:269 [inline]
alloc_pages_node_noprof include/linux/gfp.h:296 [inline]
alloc_slab_page+0x56/0x110 mm/slub.c:2265
allocate_slab mm/slub.c:2428 [inline]
new_slab+0x84/0x260 mm/slub.c:2481