syzbot


KASAN: use-after-free Read in unaccount_page_cache_page

Status: auto-obsoleted due to no activity on 2023/08/23 09:09
Reported-by: syzbot+e1314fa90cb4ae2450ca@syzkaller.appspotmail.com
First crash: 740d, last: 526d
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-5-15 KASAN: use-after-free Read in unaccount_page_cache_page 118 260d 735d 0/2 auto-obsoleted due to no activity on 2024/05/01 01:14
android-5-10 KASAN: use-after-free Read in unaccount_page_cache_page 150 214d 742d 0/2 auto-obsoleted due to no activity on 2024/06/10 16:28
android-54 KASAN: slab-out-of-bounds Read in unaccount_page_cache_page 2 295d 376d 0/2 auto-obsoleted due to no activity on 2024/04/30 10:15
android-5-10 KASAN: use-after-free Read in unaccount_page_cache_page (2) 1 99d 99d 0/2 auto-obsoleted due to no activity on 2024/11/11 21:33
android-5-15 KASAN: use-after-free Read in unaccount_page_cache_page (2) 2 18d 90d 0/2 premoderation: reported on 2024/08/23 02:36

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in cleancache_fs_enabled_mapping include/linux/cleancache.h:54 [inline]
BUG: KASAN: use-after-free in cleancache_invalidate_page include/linux/cleancache.h:108 [inline]
BUG: KASAN: use-after-free in unaccount_page_cache_page+0x6e6/0x750 mm/filemap.c:169
Read of size 4 at addr ffff8881ba1ea488 by task syz-executor.1/5735

CPU: 0 PID: 5735 Comm: syz-executor.1 Not tainted 5.4.242-syzkaller-00010-g39a9b92e9828 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1d8/0x241 lib/dump_stack.c:118
 print_address_description+0x8c/0x600 mm/kasan/report.c:384
 __kasan_report+0xf3/0x120 mm/kasan/report.c:516
 kasan_report+0x30/0x60 mm/kasan/common.c:653
 cleancache_fs_enabled_mapping include/linux/cleancache.h:54 [inline]
 cleancache_invalidate_page include/linux/cleancache.h:108 [inline]
 unaccount_page_cache_page+0x6e6/0x750 mm/filemap.c:169
 __delete_from_page_cache+0xd0/0x600 mm/filemap.c:237
 __remove_mapping+0x4a2/0x590 mm/vmscan.c:978
 shrink_page_list+0x22f9/0x42c0 mm/vmscan.c:1482
 shrink_inactive_list+0x533/0xfe0 mm/vmscan.c:2001
 shrink_list mm/vmscan.c:2293 [inline]
 shrink_node_memcg+0xc42/0x2430 mm/vmscan.c:2623
 shrink_node+0x389/0x14a0 mm/vmscan.c:2836
 shrink_zones mm/vmscan.c:3053 [inline]
 do_try_to_free_pages+0x63f/0x12b0 mm/vmscan.c:3111
 try_to_free_mem_cgroup_pages+0x3f6/0x9b0 mm/vmscan.c:3412
 memory_max_write+0x23a/0x440 mm/memcontrol.c:6224
 cgroup_file_write+0x275/0x5f0 kernel/cgroup/cgroup.c:3898
 kernfs_fop_write+0x2e2/0x3e0 fs/kernfs/file.c:315
 __vfs_write+0x103/0x750 fs/read_write.c:494
 vfs_write+0x206/0x4e0 fs/read_write.c:558
 ksys_write+0x199/0x2c0 fs/read_write.c:611
 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x5c/0xc1

Allocated by task 4106:
 save_stack mm/kasan/common.c:70 [inline]
 set_track mm/kasan/common.c:78 [inline]
 __kasan_kmalloc+0x171/0x210 mm/kasan/common.c:529
 slab_post_alloc_hook mm/slab.h:584 [inline]
 slab_alloc_node mm/slub.c:2829 [inline]
 slab_alloc mm/slub.c:2837 [inline]
 __kmalloc_track_caller+0x100/0x2b0 mm/slub.c:4449
 __kmalloc_reserve net/core/skbuff.c:142 [inline]
 __alloc_skb+0xb4/0x4d0 net/core/skbuff.c:210
 alloc_skb include/linux/skbuff.h:1080 [inline]
 alloc_skb_with_frags+0x92/0x550 net/core/skbuff.c:5811
 sock_alloc_send_pskb+0x831/0x950 net/core/sock.c:2261
 mld_newpack+0x1b2/0x990 net/ipv6/mcast.c:1607
 add_grhead net/ipv6/mcast.c:1710 [inline]
 add_grec+0xec5/0x12f0 net/ipv6/mcast.c:1841
 mld_send_cr net/ipv6/mcast.c:1967 [inline]
 mld_ifc_timer_expire+0x73d/0xc10 net/ipv6/mcast.c:2474
 call_timer_fn+0x36/0x390 kernel/time/timer.c:1418
 expire_timers kernel/time/timer.c:1463 [inline]
 __run_timers+0x879/0xbe0 kernel/time/timer.c:1787
 run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1800
 __do_softirq+0x23b/0x6b7 kernel/softirq.c:292

Freed by task 4106:
 save_stack mm/kasan/common.c:70 [inline]
 set_track mm/kasan/common.c:78 [inline]
 kasan_set_free_info mm/kasan/common.c:345 [inline]
 __kasan_slab_free+0x1b5/0x270 mm/kasan/common.c:487
 slab_free_hook mm/slub.c:1455 [inline]
 slab_free_freelist_hook mm/slub.c:1494 [inline]
 slab_free mm/slub.c:3080 [inline]
 kfree+0x123/0x370 mm/slub.c:4071
 skb_release_all net/core/skbuff.c:675 [inline]
 __kfree_skb net/core/skbuff.c:689 [inline]
 kfree_skb+0xb8/0x3c0 net/core/skbuff.c:708
 mld_sendpack+0x534/0xb50 net/ipv6/mcast.c:1694
 mld_send_cr net/ipv6/mcast.c:1975 [inline]
 mld_ifc_timer_expire+0x814/0xc10 net/ipv6/mcast.c:2474
 call_timer_fn+0x36/0x390 kernel/time/timer.c:1418
 expire_timers kernel/time/timer.c:1463 [inline]
 __run_timers+0x879/0xbe0 kernel/time/timer.c:1787
 run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1800
 __do_softirq+0x23b/0x6b7 kernel/softirq.c:292

The buggy address belongs to the object at ffff8881ba1ea000
 which belongs to the cache kmalloc-2k of size 2048
The buggy address is located 1160 bytes inside of
 2048-byte region [ffff8881ba1ea000, ffff8881ba1ea800)
The buggy address belongs to the page:
page:ffffea0006e87a00 refcount:1 mapcount:0 mapping:ffff8881f5c0c000 index:0x0 compound_mapcount: 0
flags: 0x8000000000010200(slab|head)
raw: 8000000000010200 dead000000000100 dead000000000122 ffff8881f5c0c000
raw: 0000000000000000 0000000000080008 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d28c0(GFP_NOWAIT|__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL)
 set_page_owner include/linux/page_owner.h:31 [inline]
 post_alloc_hook mm/page_alloc.c:2165 [inline]
 prep_new_page+0x18f/0x370 mm/page_alloc.c:2171
 get_page_from_freelist+0x2d13/0x2d90 mm/page_alloc.c:3794
 __alloc_pages_nodemask+0x393/0x840 mm/page_alloc.c:4891
 alloc_slab_page+0x39/0x3c0 mm/slub.c:343
 allocate_slab mm/slub.c:1683 [inline]
 new_slab+0x97/0x440 mm/slub.c:1749
 new_slab_objects mm/slub.c:2505 [inline]
 ___slab_alloc+0x2fe/0x490 mm/slub.c:2667
 __slab_alloc+0x62/0xa0 mm/slub.c:2707
 slab_alloc_node mm/slub.c:2792 [inline]
 slab_alloc mm/slub.c:2837 [inline]
 __kmalloc_track_caller+0x16d/0x2b0 mm/slub.c:4449
 __kmalloc_reserve net/core/skbuff.c:142 [inline]
 pskb_expand_head+0x10c/0x10b0 net/core/skbuff.c:1647
 netlink_trim+0x198/0x230 net/netlink/af_netlink.c:1303
 netlink_broadcast_filtered+0x62/0x1280 net/netlink/af_netlink.c:1508
 netlink_broadcast net/netlink/af_netlink.c:1553 [inline]
 nlmsg_multicast include/net/netlink.h:968 [inline]
 nlmsg_notify+0xf7/0x1b0 net/netlink/af_netlink.c:2552
 rtnl_notify net/core/rtnetlink.c:737 [inline]
 rtmsg_ifinfo_send net/core/rtnetlink.c:3529 [inline]
 rtmsg_ifinfo_event net/core/rtnetlink.c:3544 [inline]
 rtnetlink_event+0x155/0x1b0 net/core/rtnetlink.c:5315
 notifier_call_chain kernel/notifier.c:98 [inline]
 __raw_notifier_call_chain kernel/notifier.c:399 [inline]
 raw_notifier_call_chain+0x95/0x110 kernel/notifier.c:406
 call_netdevice_notifiers_info net/core/dev.c:1670 [inline]
 call_netdevice_notifiers_extack net/core/dev.c:1682 [inline]
 call_netdevice_notifiers net/core/dev.c:1696 [inline]
 dev_set_mac_address+0x3a9/0x510 net/core/dev.c:8188
 dev_set_mac_address_user+0x2d/0x50 net/core/dev.c:8202
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1176 [inline]
 __free_pages_ok+0x847/0x950 mm/page_alloc.c:1438
 free_the_page mm/page_alloc.c:4953 [inline]
 __free_pages+0x91/0x140 mm/page_alloc.c:4959
 free_thread_stack kernel/fork.c:299 [inline]
 release_task_stack kernel/fork.c:439 [inline]
 put_task_stack+0x212/0x260 kernel/fork.c:450
 finish_task_switch+0x24a/0x590 kernel/sched/core.c:3479
 context_switch kernel/sched/core.c:3611 [inline]
 __schedule+0xb0d/0x1320 kernel/sched/core.c:4307
 schedule_idle+0x50/0x80 kernel/sched/core.c:4403
 do_idle+0x609/0x660 kernel/sched/idle.c:288
 cpu_startup_entry+0x14/0x20 kernel/sched/idle.c:356
 start_kernel+0x6de/0x822 init/main.c:1047
 secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:241

Memory state around the buggy address:
 ffff8881ba1ea380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8881ba1ea400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff8881ba1ea480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                      ^
 ffff8881ba1ea500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8881ba1ea580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
syz-executor.1 invoked oom-killer: gfp_mask=0xcc0(GFP_KERNEL), order=0, oom_score_adj=1000
CPU: 0 PID: 5735 Comm: syz-executor.1 Tainted: G    B             5.4.242-syzkaller-00010-g39a9b92e9828 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1d8/0x241 lib/dump_stack.c:118
 dump_header+0xd5/0x6b0 mm/oom_kill.c:460
 oom_kill_process+0xeb/0x2c0 mm/oom_kill.c:974
 out_of_memory+0x5e1/0x890 mm/oom_kill.c:1111
 mem_cgroup_out_of_memory+0x211/0x270 mm/memcontrol.c:1611
 memory_max_write+0x329/0x440 mm/memcontrol.c:6231
 cgroup_file_write+0x275/0x5f0 kernel/cgroup/cgroup.c:3898
 kernfs_fop_write+0x2e2/0x3e0 fs/kernfs/file.c:315
 __vfs_write+0x103/0x750 fs/read_write.c:494
 vfs_write+0x206/0x4e0 fs/read_write.c:558
 ksys_write+0x199/0x2c0 fs/read_write.c:611
 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x5c/0xc1
memory: usage 22472kB, limit 0kB, failcnt 413
swap: usage 0kB, limit 9007199254740988kB, failcnt 0
Memory cgroup stats for /syz0:
anon 12779520
file 10420224
kernel_stack 0
slab 0
sock 122880
shmem 10276864
file_mapped 135168
file_dirty 0
file_writeback 0
anon_thp 0
inactive_anon 4055040
active_anon 18919424
inactive_file 0
active_file 90112
unevictable 0
slab_reclaimable 0
slab_unreclaimable 0
pgfault 1755864
pgmajfault 0
workingset_refault 33
workingset_activate 0
workingset_nodereclaim 0
pgrefill 656
pgscan 639
pgsteal 149
pgactivate 4488
oom-kill:constraint=CONSTRAINT_MEMCG,nodemask=(null),cpuset=syz1,mems_allowed=0,oom_memcg=/syz0,task_memcg=/syz0,task=syz-executor.0,pid=12713,uid=0
Memory cgroup out of memory: Killed process 12713 (syz-executor.0) total-vm:54932kB, anon-rss:4644kB, file-rss:14336kB, shmem-rss:0kB, UID:0 pgtables:92kB oom_score_adj:1000

Crashes (143):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/06/13 21:54 android12-5.4 39a9b92e9828 d2ee9228 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan KASAN: use-after-free Read in unaccount_page_cache_page
2023/06/12 20:31 android12-5.4 888c475b73b8 aaed0183 .config console log report info ci2-android-5-4-kasan KASAN: use-after-free Read in unaccount_page_cache_page
2023/06/09 17:20 android12-5.4 10e0626a3202 9018a337 .config console log report info ci2-android-5-4-kasan KASAN: use-after-free Read in unaccount_page_cache_page
2023/06/07 23:53 android12-5.4 10e0626a3202 058b3a5a .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan KASAN: use-after-free Read in unaccount_page_cache_page
2023/06/02 02:08 android12-5.4 10e0626a3202 a4ae4f42 .config console log report info ci2-android-5-4-kasan KASAN: use-after-free Read in unaccount_page_cache_page
2023/05/31 22:07 android12-5.4 10e0626a3202 babc4389 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan KASAN: use-after-free Read in unaccount_page_cache_page
2023/05/31 09:28 android12-5.4 10e0626a3202 09898419 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan KASAN: use-after-free Read in unaccount_page_cache_page
2023/05/30 22:39 android12-5.4 10e0626a3202 df37c7f1 .config console log report info ci2-android-5-4-kasan KASAN: use-after-free Read in unaccount_page_cache_page
2023/05/26 10:01 android12-5.4 e7141bb18b62 b40ef614 .config console log report info ci2-android-5-4-kasan KASAN: use-after-free Read in unaccount_page_cache_page
2023/05/26 06:52 android12-5.4 e7141bb18b62 b40ef614 .config console log report info ci2-android-5-4-kasan KASAN: use-after-free Read in unaccount_page_cache_page
2023/05/25 08:41 android12-5.4 e7141bb18b62 4bce1a3e .config console log report info ci2-android-5-4-kasan KASAN: use-after-free Read in unaccount_page_cache_page
2023/05/24 16:56 android12-5.4 3ca47ce937f0 4bce1a3e .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan KASAN: use-after-free Read in unaccount_page_cache_page
2023/05/17 22:21 android12-5.4 f423d52eea72 3bb7af1d .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan KASAN: use-after-free Read in unaccount_page_cache_page
2023/05/13 10:34 android12-5.4 f423d52eea72 2b9ba477 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan KASAN: use-after-free Read in unaccount_page_cache_page
2023/05/13 09:08 android12-5.4 f423d52eea72 2b9ba477 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan KASAN: use-after-free Read in unaccount_page_cache_page
2023/05/12 15:43 android12-5.4 f423d52eea72 ecca8a24 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan KASAN: use-after-free Read in unaccount_page_cache_page
2023/05/11 14:33 android12-5.4 22edba7840f2 0fbd49f4 .config console log report info ci2-android-5-4-kasan KASAN: use-after-free Read in unaccount_page_cache_page
2023/05/06 12:05 android12-5.4 0fcb7cff9462 90c93c40 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan KASAN: use-after-free Read in unaccount_page_cache_page
2023/05/05 04:52 android12-5.4 cf4e000017b8 518a39a6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan KASAN: use-after-free Read in unaccount_page_cache_page
2023/05/02 10:55 android12-5.4 d5ed2ca98e48 52d40fd2 .config console log report info ci2-android-5-4-kasan KASAN: use-after-free Read in unaccount_page_cache_page
2023/05/01 23:12 android12-5.4 d5ed2ca98e48 62df2017 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan KASAN: use-after-free Read in unaccount_page_cache_page
2023/05/01 01:34 android12-5.4 d5ed2ca98e48 62df2017 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan KASAN: use-after-free Read in unaccount_page_cache_page
2023/04/27 15:05 android12-5.4 d5ed2ca98e48 6f3d6fa7 .config console log report info ci2-android-5-4-kasan KASAN: use-after-free Read in unaccount_page_cache_page
2023/04/26 01:27 android12-5.4 0108362f3305 65320f8e .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan KASAN: use-after-free Read in unaccount_page_cache_page
2023/04/23 18:55 android12-5.4 0108362f3305 2b32bd34 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan KASAN: use-after-free Read in unaccount_page_cache_page
2023/04/22 11:18 android12-5.4 0108362f3305 2b32bd34 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan KASAN: use-after-free Read in unaccount_page_cache_page
2023/04/16 02:57 android12-5.4 21086923c1e6 ec410564 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan KASAN: use-after-free Read in unaccount_page_cache_page
2023/04/15 12:11 android12-5.4 21086923c1e6 ec410564 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan KASAN: use-after-free Read in unaccount_page_cache_page
2023/04/14 13:45 android12-5.4 21086923c1e6 ec410564 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan KASAN: use-after-free Read in unaccount_page_cache_page
2023/04/11 17:23 android12-5.4 21086923c1e6 49faf98d .config console log report info ci2-android-5-4-kasan KASAN: use-after-free Read in unaccount_page_cache_page
2023/04/06 06:24 android12-5.4 21086923c1e6 8b834965 .config console log report info ci2-android-5-4-kasan KASAN: use-after-free Read in unaccount_page_cache_page
2023/04/05 19:26 android12-5.4 21086923c1e6 8b834965 .config console log report info ci2-android-5-4-kasan KASAN: use-after-free Read in unaccount_page_cache_page
2023/04/05 10:46 android12-5.4 d229b250494c 831373d3 .config console log report info ci2-android-5-4-kasan KASAN: use-after-free Read in unaccount_page_cache_page
2023/04/05 01:46 android12-5.4 d229b250494c 831373d3 .config console log report info ci2-android-5-4-kasan KASAN: use-after-free Read in unaccount_page_cache_page
2023/04/04 09:22 android12-5.4 a6b5274af71b 928dd177 .config console log report info ci2-android-5-4-kasan KASAN: use-after-free Read in unaccount_page_cache_page
2023/04/03 22:38 android12-5.4 a6b5274af71b 41147e3e .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan KASAN: use-after-free Read in unaccount_page_cache_page
2023/03/25 12:01 android12-5.4 07edbcca3d39 fbf0499a .config console log report info ci2-android-5-4-kasan KASAN: use-after-free Read in unaccount_page_cache_page
2023/03/20 09:23 android12-5.4 f4e4be09c27c 7939252e .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan KASAN: use-after-free Read in unaccount_page_cache_page
2022/11/12 16:10 android12-5.4 5a34019eb955 f42ee5d8 .config console log report info ci2-android-5-4-kasan KASAN: use-after-free Read in unaccount_page_cache_page
2023/06/08 01:43 android12-5.4 10e0626a3202 058b3a5a .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan KASAN: slab-out-of-bounds Read in unaccount_page_cache_page
2023/05/31 10:58 android12-5.4 10e0626a3202 09898419 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan KASAN: slab-out-of-bounds Read in unaccount_page_cache_page
2023/05/20 15:20 android12-5.4 dd94985a9b62 4bce1a3e .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan KASAN: slab-out-of-bounds Read in unaccount_page_cache_page
2023/05/19 19:14 android12-5.4 dd94985a9b62 96689200 .config console log report info ci2-android-5-4-kasan KASAN: slab-out-of-bounds Read in unaccount_page_cache_page
2023/05/10 05:04 android12-5.4 0fcb7cff9462 1964022b .config console log report info ci2-android-5-4-kasan KASAN: slab-out-of-bounds Read in unaccount_page_cache_page
2023/04/26 17:09 android12-5.4 8a14194b61da 8d843721 .config console log report info ci2-android-5-4-kasan KASAN: slab-out-of-bounds Read in unaccount_page_cache_page
2023/04/12 08:25 android12-5.4 21086923c1e6 1a1596b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-4-kasan KASAN: slab-out-of-bounds Read in unaccount_page_cache_page
* Struck through repros no longer work on HEAD.