syzbot


KASAN: slab-out-of-bounds Write in pskb_expand_head

Status: auto-obsoleted due to no activity on 2024/10/04 22:43
Bug presence: origin:lts-only
[Documentation on labels]
Reported-by: syzbot+c9ac918714c3dfc9108c@syzkaller.appspotmail.com
First crash: 621d, last: 554d
Fix bisection: failed (error log, bisect log)
  
Bug presence (2)
Date Name Commit Repro Result
2023/05/17 linux-5.15.y (ToT) b0ece631f84a C [report] KASAN: slab-out-of-bounds Write in pskb_expand_head
2023/05/16 upstream (ToT) f1fcbaa18b28 C Didn't crash
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream Internal error in pskb_expand_head net 7 529d 555d 0/28 closed as invalid on 2023/08/28 10:04
Last patch testing requests (1)
Created Duration User Patch Repo Result
2024/10/04 21:19 1h23m retest repro linux-5.15.y OK log
Fix bisection attempts (10)
Created Duration User Patch Repo Result
2024/08/16 12:25 1m fix candidate upstream error job log
2024/07/05 22:58 58m fix candidate upstream error job log
2024/05/23 13:54 30m fix candidate upstream error job log
2024/04/16 10:27 40m fix candidate upstream error job log
2024/03/15 08:38 3m fix candidate upstream error job log
2024/01/06 16:12 1m fix candidate upstream error job log
2023/11/07 20:45 25m fix candidate upstream error job log
2023/06/16 01:28 1m bisect fix linux-5.15.y error job log
2023/05/11 06:32 1h09m bisect fix linux-5.15.y OK (0) job log log
2023/04/10 17:21 50m bisect fix linux-5.15.y OK (0) job log log

Sample crash report:
==================================================================
BUG: KASAN: slab-out-of-bounds in pskb_expand_head+0x1c4/0x1064 net/core/skbuff.c:1714
Write of size 48 at addr ffff0000c1c3e1c0 by task kworker/0:0/7

CPU: 0 PID: 7 Comm: kworker/0:0 Not tainted 5.15.99-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
Workqueue: mld mld_ifc_work
Call trace:
 dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152
 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
 print_address_description+0x7c/0x3f0 mm/kasan/report.c:248
 __kasan_report mm/kasan/report.c:434 [inline]
 kasan_report+0x174/0x1e4 mm/kasan/report.c:451
 kasan_check_range+0x274/0x2b4 mm/kasan/generic.c:189
 memcpy+0xb4/0xe8 mm/kasan/shadow.c:66
 pskb_expand_head+0x1c4/0x1064 net/core/skbuff.c:1714
 __skb_cow include/linux/skbuff.h:3364 [inline]
 skb_cow_head include/linux/skbuff.h:3398 [inline]
 batadv_skb_head_push+0x158/0x1e8 net/batman-adv/soft-interface.c:73
 batadv_interface_tx+0xb74/0x12d8 net/batman-adv/soft-interface.c:330
 __netdev_start_xmit include/linux/netdevice.h:5017 [inline]
 netdev_start_xmit include/linux/netdevice.h:5031 [inline]
 xmit_one net/core/dev.c:3590 [inline]
 dev_hard_start_xmit+0x3a0/0xc50 net/core/dev.c:3606
 __dev_queue_xmit+0x1500/0x2c20 net/core/dev.c:4221
 dev_queue_xmit+0x24/0x34 net/core/dev.c:4254
 neigh_hh_output include/net/neighbour.h:500 [inline]
 neigh_output include/net/neighbour.h:514 [inline]
 ip6_finish_output2+0x1310/0x1c48 net/ipv6/ip6_output.c:126
 __ip6_finish_output+0x518/0x67c net/ipv6/ip6_output.c:191
 ip6_finish_output+0x40/0x218 net/ipv6/ip6_output.c:201
 NF_HOOK_COND include/linux/netfilter.h:296 [inline]
 ip6_output+0x270/0x594 net/ipv6/ip6_output.c:224
 dst_output include/net/dst.h:449 [inline]
 NF_HOOK+0x160/0x4ec include/linux/netfilter.h:307
 mld_sendpack+0x828/0x1264 net/ipv6/mcast.c:1820
 mld_send_cr net/ipv6/mcast.c:2121 [inline]
 mld_ifc_work+0x85c/0xb9c net/ipv6/mcast.c:2653
 process_one_work+0x84c/0x14b8 kernel/workqueue.c:2306
 worker_thread+0x910/0x1034 kernel/workqueue.c:2453
 kthread+0x37c/0x45c kernel/kthread.c:319
 ret_from_fork+0x10/0x20 <unknown>:870

Allocated by task 1:
 kasan_save_stack mm/kasan/common.c:38 [inline]
 kasan_set_track mm/kasan/common.c:46 [inline]
 set_alloc_info mm/kasan/common.c:434 [inline]
 ____kasan_kmalloc+0xbc/0xfc mm/kasan/common.c:513
 __kasan_kmalloc+0x10/0x1c mm/kasan/common.c:522
 kasan_kmalloc include/linux/kasan.h:264 [inline]
 kmem_cache_alloc_trace+0x248/0x3b4 mm/slub.c:3247
 kmalloc include/linux/slab.h:591 [inline]
 kzalloc include/linux/slab.h:721 [inline]
 call_usermodehelper_setup+0xa8/0x254 kernel/umh.c:365
 kobject_uevent_env+0x660/0x898 lib/kobject_uevent.c:614
 kobject_uevent+0x2c/0x3c lib/kobject_uevent.c:642
 kernel_add_sysfs_param+0x104/0x138 kernel/params.c:816
 param_sysfs_builtin+0x180/0x1ec kernel/params.c:851
 param_sysfs_init+0x70/0x80 kernel/params.c:970
 do_one_initcall+0x2e4/0xc68 init/main.c:1306
 do_initcall_level+0x154/0x214 init/main.c:1379
 do_initcalls+0x58/0xac init/main.c:1395
 do_basic_setup+0x8c/0xa0 init/main.c:1414
 kernel_init_freeable+0x470/0x650 init/main.c:1619
 kernel_init+0x24/0x294 init/main.c:1510
 ret_from_fork+0x10/0x20 <unknown>:870

The buggy address belongs to the object at ffff0000c1c3e000
 which belongs to the cache kmalloc-256 of size 256
The buggy address is located 192 bytes to the right of
 256-byte region [ffff0000c1c3e000, ffff0000c1c3e100)
The buggy address belongs to the page:
page:0000000069d69f6d refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101c3e
head:0000000069d69f6d order:1 compound_mapcount:0
flags: 0x5ffc00000010200(slab|head|node=0|zone=2|lastcpupid=0x7ff)
raw: 05ffc00000010200 dead000000000100 dead000000000122 ffff0000c0002480
raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff0000c1c3e080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff0000c1c3e100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff0000c1c3e180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                                           ^
 ffff0000c1c3e200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff0000c1c3e280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
Unable to handle kernel paging request at virtual address dfff800000000000
Mem abort info:
  ESR = 0x0000000096000006
  EC = 0x25: DABT (current EL), IL = 32 bits
  SET = 0, FnV = 0
  EA = 0, S1PTW = 0
  FSC = 0x06: level 2 translation fault
Data abort info:
  ISV = 0, ISS = 0x00000006
  CM = 0, WnR = 0
[dfff800000000000] address between user and kernel address ranges
Internal error: Oops: 96000006 [#1] PREEMPT SMP
Modules linked in:
CPU: 0 PID: 7 Comm: kworker/0:0 Tainted: G    B             5.15.99-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
Workqueue: mld mld_ifc_work
pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : _compound_head include/linux/page-flags.h:196 [inline]
pc : put_page+0x2c/0x21c include/linux/mm.h:1233
lr : put_page+0x24/0x21c include/linux/mm.h:1232
sp : ffff8000189a7050
x29: ffff8000189a7050 x28: ffff0001c1c3e1f0 x27: 1fffe0001b4eb00f
x26: dfff800000000000 x25: ffffffffffffffff x24: 1fffe00038387c38
x23: ffff0001c1c3e1f0 x22: 0000000000000000 x21: dfff800000000000
x20: 0000000000000007 x19: ffffffffffffffff x18: 0000000000000402
x17: ff808000083386a0 x16: ffff800011a08b18 x15: ffff8000083386a0
x14: 00000000ffffffff x13: ffffffffffffffff x12: 0000000000000000
x11: ff8080000fdc8df0 x10: 0000000000000000 x9 : ffff80000fdc8df0
x8 : 0000000000000000 x7 : 0000000000000000 x6 : ffff80000fdbd374
x5 : 0000000000000000 x4 : 0000000000000000 x3 : ffff80000fdb3d58
x2 : 0000000000000001 x1 : 0000000000000000 x0 : ffffffffffffffff
Call trace:
 _compound_head include/linux/page-flags.h:196 [inline]
 put_page+0x2c/0x21c include/linux/mm.h:1233
 __skb_frag_unref include/linux/skbuff.h:3218 [inline]
 skb_release_data+0x2e4/0x5fc net/core/skbuff.c:672
 skb_release_all net/core/skbuff.c:742 [inline]
 __kfree_skb net/core/skbuff.c:756 [inline]
 consume_skb+0xa0/0x18c net/core/skbuff.c:914
 batadv_send_bcast_packet+0x44/0x58 net/batman-adv/send.c:999
 batadv_interface_tx+0xcec/0x12d8 net/batman-adv/soft-interface.c:351
 __netdev_start_xmit include/linux/netdevice.h:5017 [inline]
 netdev_start_xmit include/linux/netdevice.h:5031 [inline]
 xmit_one net/core/dev.c:3590 [inline]
 dev_hard_start_xmit+0x3a0/0xc50 net/core/dev.c:3606
 __dev_queue_xmit+0x1500/0x2c20 net/core/dev.c:4221
 dev_queue_xmit+0x24/0x34 net/core/dev.c:4254
 neigh_hh_output include/net/neighbour.h:500 [inline]
 neigh_output include/net/neighbour.h:514 [inline]
 ip6_finish_output2+0x1310/0x1c48 net/ipv6/ip6_output.c:126
 __ip6_finish_output+0x518/0x67c net/ipv6/ip6_output.c:191
 ip6_finish_output+0x40/0x218 net/ipv6/ip6_output.c:201
 NF_HOOK_COND include/linux/netfilter.h:296 [inline]
 ip6_output+0x270/0x594 net/ipv6/ip6_output.c:224
 dst_output include/net/dst.h:449 [inline]
 NF_HOOK+0x160/0x4ec include/linux/netfilter.h:307
 mld_sendpack+0x828/0x1264 net/ipv6/mcast.c:1820
 mld_send_cr net/ipv6/mcast.c:2121 [inline]
 mld_ifc_work+0x85c/0xb9c net/ipv6/mcast.c:2653
 process_one_work+0x84c/0x14b8 kernel/workqueue.c:2306
 worker_thread+0x910/0x1034 kernel/workqueue.c:2453
 kthread+0x37c/0x45c kernel/kthread.c:319
 ret_from_fork+0x10/0x20 <unknown>:870
Code: f2fbfff5 961bf75c 91002274 d343fe88 (38756908) 
---[ end trace e2058ed71e43c7ab ]---
----------------
Code disassembly (best guess):
   0:	f2fbfff5 	movk	x21, #0xdfff, lsl #48
   4:	961bf75c 	bl	0xfffffffff86fdd74
   8:	91002274 	add	x20, x19, #0x8
   c:	d343fe88 	lsr	x8, x20, #3
* 10:	38756908 	ldrb	w8, [x8, x21] <-- trapping instruction

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/03/11 13:02 linux-5.15.y abddfcf701a5 5205ef30 .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 KASAN: slab-out-of-bounds Write in pskb_expand_head
* Struck through repros no longer work on HEAD.