syzbot


KASAN: use-after-free Read in skb_release_data

Status: upstream: reported syz repro on 2024/04/17 18:13
Bug presence: origin:lts-only
[Documentation on labels]
Reported-by: syzbot+4b49d6561fa01e744179@syzkaller.appspotmail.com
First crash: 32d, last: 14h44m
Bug presence (2)
Date Name Commit Repro Result
2024/05/08 linux-6.1.y (ToT) 909ba1f1b414 C [report] INFO: rcu detected stall in corrupted
2024/05/08 upstream (ToT) dccb07f2914c C Didn't crash
Similar bugs (10)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-49 KASAN: use-after-free Read in skb_release_data 1 2201d 2201d 0/3 auto-closed as invalid on 2019/02/22 12:31
linux-4.14 KASAN: use-after-free Read in skb_release_data 1 1749d 1749d 0/1 auto-closed as invalid on 2019/12/02 22:53
upstream KASAN: use-after-free Read in skb_release_data syz 7 2469d 2468d 3/26 fixed on 2017/10/24 06:54
linux-5.15 KASAN: use-after-free Read in skb_release_data 1 407d 407d 0/3 auto-obsoleted due to no activity on 2023/08/06 13:46
linux-4.14 KASAN: use-after-free Read in skb_release_data (2) syz inconclusive 1 1538d 1538d 0/1 upstream: reported syz repro on 2020/03/03 17:50
upstream general protection fault in skb_release_data (2) net C done error 570 1d07h 1348d 0/26 upstream: reported C repro on 2020/09/09 09:58
upstream KASAN: use-after-free Read in skb_release_data (2) bluetooth syz done done 1 1540d 1540d 0/26 auto-obsoleted due to no activity on 2022/09/13 15:46
upstream KMSAN: uninit-value in skb_release_data (3) net C 10 669d 1348d 0/26 auto-obsoleted due to no activity on 2022/11/17 07:20
upstream KASAN: use-after-free Write in skb_release_data (2) net C done unreliable 875 983d 2043d 0/26 auto-obsoleted due to no activity on 2023/04/16 03:59
linux-4.19 KASAN: use-after-free Write in skb_release_data (2) 3 1113d 1189d 0/1 auto-closed as invalid on 2021/08/30 12:28

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in skb_release_data+0x5a4/0x6b0 net/core/skbuff.c:802
Read of size 1 at addr ffff0000d61dd6be by task syz-executor.1/4265

CPU: 1 PID: 4265 Comm: syz-executor.1 Not tainted 6.1.90-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
Call trace:
 dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158
 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
 print_address_description mm/kasan/report.c:284 [inline]
 print_report+0x174/0x4c0 mm/kasan/report.c:395
 kasan_report+0xd4/0x130 mm/kasan/report.c:495
 __asan_report_load1_noabort+0x2c/0x38 mm/kasan/report_generic.c:348
 skb_release_data+0x5a4/0x6b0 net/core/skbuff.c:802
 skb_release_all net/core/skbuff.c:856 [inline]
 __kfree_skb net/core/skbuff.c:870 [inline]
 kfree_skb_reason+0x1a4/0x47c net/core/skbuff.c:893
 kfree_skb include/linux/skbuff.h:1220 [inline]
 __hci_req_sync+0x4fc/0x7ac net/bluetooth/hci_request.c:184
 hci_req_sync+0xa4/0xd0 net/bluetooth/hci_request.c:206
 hci_dev_cmd+0x330/0x90c net/bluetooth/hci_core.c:790
 hci_sock_ioctl+0x4b8/0x82c net/bluetooth/hci_sock.c:1096
 sock_do_ioctl+0x134/0x2dc net/socket.c:1204
 sock_ioctl+0x4ec/0x858 net/socket.c:1321
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl fs/ioctl.c:856 [inline]
 __arm64_sys_ioctl+0x14c/0x1c8 fs/ioctl.c:856
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
 do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
 el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585

Allocated by task 47:
 kasan_save_stack mm/kasan/common.c:45 [inline]
 kasan_set_track+0x4c/0x80 mm/kasan/common.c:52
 kasan_save_alloc_info+0x24/0x30 mm/kasan/generic.c:505
 __kasan_slab_alloc+0x74/0x8c mm/kasan/common.c:328
 kasan_slab_alloc include/linux/kasan.h:201 [inline]
 slab_post_alloc_hook+0x74/0x458 mm/slab.h:737
 slab_alloc_node mm/slub.c:3398 [inline]
 slab_alloc mm/slub.c:3406 [inline]
 __kmem_cache_alloc_lru mm/slub.c:3413 [inline]
 kmem_cache_alloc+0x230/0x37c mm/slub.c:3422
 skb_clone+0x19c/0x304 net/core/skbuff.c:1660
 hci_send_cmd_sync net/bluetooth/hci_core.c:4179 [inline]
 hci_cmd_work+0x174/0x568 net/bluetooth/hci_core.c:4199
 process_one_work+0x7ac/0x1404 kernel/workqueue.c:2292
 worker_thread+0x8e4/0xfec kernel/workqueue.c:2439
 kthread+0x250/0x2d8 kernel/kthread.c:376
 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:864

Freed by task 4280:
 kasan_save_stack mm/kasan/common.c:45 [inline]
 kasan_set_track+0x4c/0x80 mm/kasan/common.c:52
 kasan_save_free_info+0x38/0x5c mm/kasan/generic.c:516
 ____kasan_slab_free+0x144/0x1c0 mm/kasan/common.c:236
 __kasan_slab_free+0x18/0x28 mm/kasan/common.c:244
 kasan_slab_free include/linux/kasan.h:177 [inline]
 slab_free_hook mm/slub.c:1724 [inline]
 slab_free_freelist_hook mm/slub.c:1750 [inline]
 slab_free mm/slub.c:3661 [inline]
 kmem_cache_free+0x2f0/0x588 mm/slub.c:3683
 kfree_skbmem+0x10c/0x19c
 __kfree_skb net/core/skbuff.c:871 [inline]
 kfree_skb_reason+0x1ac/0x47c net/core/skbuff.c:893
 kfree_skb include/linux/skbuff.h:1220 [inline]
 hci_req_sync_complete+0xcc/0x258 net/bluetooth/hci_request.c:109
 hci_event_packet+0xbd4/0x109c net/bluetooth/hci_event.c:7601
 hci_rx_work+0x318/0xa68 net/bluetooth/hci_core.c:4130
 process_one_work+0x7ac/0x1404 kernel/workqueue.c:2292
 worker_thread+0x8e4/0xfec kernel/workqueue.c:2439
 kthread+0x250/0x2d8 kernel/kthread.c:376
 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:864

The buggy address belongs to the object at ffff0000d61dd640
 which belongs to the cache skbuff_head_cache of size 240
The buggy address is located 126 bytes inside of
 240-byte region [ffff0000d61dd640, ffff0000d61dd730)

The buggy address belongs to the physical page:
page:000000004b8bc944 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1161dd
flags: 0x5ffc00000000200(slab|node=0|zone=2|lastcpupid=0x7ff)
raw: 05ffc00000000200 0000000000000000 dead000000000122 ffff0000c0b72480
raw: 0000000000000000 00000000800c000c 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff0000d61dd580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc
 ffff0000d61dd600: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
>ffff0000d61dd680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                        ^
 ffff0000d61dd700: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc
 ffff0000d61dd780: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
chnl_net:caif_netlink_parms(): no params data found
bridge0: port 1(bridge_slave_0) entered blocking state
bridge0: port 1(bridge_slave_0) entered disabled state
device bridge_slave_0 entered promiscuous mode
bridge0: port 2(bridge_slave_1) entered blocking state
bridge0: port 2(bridge_slave_1) entered disabled state
device bridge_slave_1 entered promiscuous mode
bond0: (slave bond_slave_0): Enslaving as an active interface with an up link
bond0: (slave bond_slave_1): Enslaving as an active interface with an up link
team0: Port device team_slave_0 added
team0: Port device team_slave_1 added
batman_adv: batadv0: Adding interface: batadv_slave_0
batman_adv: batadv0: The MTU of interface batadv_slave_0 is too small (1500) to handle the transport of batman-adv packets. Packets going over this interface will be fragmented on layer2 which could impact the performance. Setting the MTU to 1560 would solve the problem.
batman_adv: batadv0: Not using interface batadv_slave_0 (retrying later): interface not active
batman_adv: batadv0: Adding interface: batadv_slave_1
batman_adv: batadv0: The MTU of interface batadv_slave_1 is too small (1500) to handle the transport of batman-adv packets. Packets going over this interface will be fragmented on layer2 which could impact the performance. Setting the MTU to 1560 would solve the problem.
batman_adv: batadv0: Not using interface batadv_slave_1 (retrying later): interface not active
device hsr_slave_0 entered promiscuous mode
device hsr_slave_1 entered promiscuous mode
debugfs: Directory 'hsr0' with parent 'hsr' already present!
Cannot create hsr debugfs directory
netdevsim netdevsim1 netdevsim0: renamed from eth0
netdevsim netdevsim1 netdevsim1: renamed from eth1
netdevsim netdevsim1 netdevsim2: renamed from eth2
netdevsim netdevsim1 netdevsim3: renamed from eth3
8021q: adding VLAN 0 to HW filter on device bond0
8021q: adding VLAN 0 to HW filter on device team0
hsr0: Slave A (hsr_slave_0) is not up; please bring it up to get a fully working HSR network
hsr0: Slave B (hsr_slave_1) is not up; please bring it up to get a fully working HSR network
8021q: adding VLAN 0 to HW filter on device batadv0
device veth0_vlan entered promiscuous mode
device veth1_vlan entered promiscuous mode
device veth0_macvtap entered promiscuous mode
device veth1_macvtap entered promiscuous mode
batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3e) already exists on: batadv_slave_0
batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems!
batman_adv: batadv0: Interface activated: batadv_slave_0
batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3f) already exists on: batadv_slave_1
batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems!
batman_adv: batadv0: Interface activated: batadv_slave_1
netdevsim netdevsim1 netdevsim0: set [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim1 netdevsim1: set [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim1 netdevsim2: set [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim1 netdevsim3: set [1, 0] type 2 family 0 port 6081 - 0

Crashes (12):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/05/08 09:27 linux-6.1.y 909ba1f1b414 4cf3f9b3 .config console log report syz [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in skb_release_data
2024/05/19 04:33 linux-6.1.y 4078fa637fcd c0f1611a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf KASAN: use-after-free Read in skb_release_data
2024/04/29 03:24 linux-6.1.y f2295faba5e8 07b455f9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in skb_release_data
2024/05/19 07:28 linux-6.1.y 4078fa637fcd c0f1611a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in skb_release_data
2024/05/18 04:45 linux-6.1.y 4078fa637fcd c0f1611a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in skb_release_data
2024/05/11 18:17 linux-6.1.y 909ba1f1b414 9026e142 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in skb_release_data
2024/05/07 01:56 linux-6.1.y 909ba1f1b414 fa7a5cf0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in skb_release_data
2024/05/06 22:51 linux-6.1.y 909ba1f1b414 fa7a5cf0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in skb_release_data
2024/05/03 02:46 linux-6.1.y 909ba1f1b414 ddfc15a1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in skb_release_data
2024/04/30 12:43 linux-6.1.y dcbc050cb0d3 3ce4924c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in skb_release_data
2024/04/24 12:41 linux-6.1.y 6741e066ec76 21339d7b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in skb_release_data
2024/04/17 18:13 linux-6.1.y 6741e066ec76 acc528cb .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in skb_release_data
* Struck through repros no longer work on HEAD.