syzbot


KASAN: slab-out-of-bounds Read in reiserfs_xattr_get

Status: upstream: reported on 2021/04/13 05:55
Reported-by: syzbot+72ba979b6681c3369db4@syzkaller.appspotmail.com
First crash: 548d, last: 5d19h

Sample crash report:
==================================================================
BUG: KASAN: slab-out-of-bounds in reiserfs_xattr_get+0xe3/0x580 fs/reiserfs/xattr.c:674
Read of size 8 at addr ffff88806f0bc198 by task syz-executor.0/8902

CPU: 0 PID: 8902 Comm: syz-executor.0 Not tainted 6.0.0-rc7-syzkaller-00042-g46452d3786a8 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
 print_address_description+0x65/0x4b0 mm/kasan/report.c:317
 print_report+0x108/0x220 mm/kasan/report.c:433
 kasan_report+0xfb/0x130 mm/kasan/report.c:495
 reiserfs_xattr_get+0xe3/0x580 fs/reiserfs/xattr.c:674
 reiserfs_get_acl+0x7a/0x650 fs/reiserfs/xattr_acl.c:214
 get_acl+0x157/0x260 fs/posix_acl.c:152
 check_acl+0x35/0x150 fs/namei.c:306
 acl_permission_check fs/namei.c:351 [inline]
 generic_permission+0x388/0x4e0 fs/namei.c:404
 do_inode_permission fs/namei.c:458 [inline]
 inode_permission+0x22c/0x450 fs/namei.c:525
 may_open+0x2a4/0x400 fs/namei.c:3185
 do_open fs/namei.c:3555 [inline]
 path_openat+0x24b4/0x2e00 fs/namei.c:3691
 do_filp_open+0x275/0x500 fs/namei.c:3718
 do_sys_openat2+0x13b/0x500 fs/open.c:1313
 do_sys_open fs/open.c:1329 [inline]
 __do_sys_openat fs/open.c:1345 [inline]
 __se_sys_openat fs/open.c:1340 [inline]
 __x64_sys_openat+0x243/0x290 fs/open.c:1340
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fc95ce3c654
Code: 84 00 00 00 00 00 44 89 54 24 0c e8 96 f9 ff ff 44 8b 54 24 0c 44 89 e2 48 89 ee 41 89 c0 bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 77 34 44 89 c7 89 44 24 0c e8 c8 f9 ff ff 8b 44
RSP: 002b:00007fc95df7af10 EFLAGS: 00000293 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 0000000020000200 RCX: 00007fc95ce3c654
RDX: 0000000000010000 RSI: 0000000020000100 RDI: 00000000ffffff9c
RBP: 0000000020000100 R08: 0000000000000000 R09: 0000000020000000
R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000010000
R13: 0000000020000100 R14: 00007fc95df7afe0 R15: 0000000020052260
 </TASK>

Allocated by task 6486:
 kasan_save_stack mm/kasan/common.c:38 [inline]
 kasan_set_track mm/kasan/common.c:45 [inline]
 set_alloc_info mm/kasan/common.c:437 [inline]
 __kasan_slab_alloc+0xb2/0xe0 mm/kasan/common.c:470
 kasan_slab_alloc include/linux/kasan.h:224 [inline]
 slab_post_alloc_hook mm/slab.h:727 [inline]
 slab_alloc_node mm/slub.c:3248 [inline]
 slab_alloc mm/slub.c:3256 [inline]
 __kmem_cache_alloc_lru mm/slub.c:3263 [inline]
 kmem_cache_alloc+0x1a6/0x310 mm/slub.c:3273
 kmem_cache_zalloc include/linux/slab.h:723 [inline]
 __kernfs_new_node+0xdb/0x730 fs/kernfs/dir.c:593
 kernfs_new_node+0x95/0x160 fs/kernfs/dir.c:655
 __kernfs_create_file+0x45/0x2e0 fs/kernfs/file.c:1050
 sysfs_add_file_mode_ns+0x21d/0x330 fs/sysfs/file.c:294
 create_files fs/sysfs/group.c:64 [inline]
 internal_create_group+0x55c/0xf50 fs/sysfs/group.c:148
 internal_create_groups fs/sysfs/group.c:188 [inline]
 sysfs_create_groups+0x5d/0x130 fs/sysfs/group.c:214
 setup_gid_attrs drivers/infiniband/core/sysfs.c:1169 [inline]
 ib_setup_port_attrs+0x14bd/0x22a0 drivers/infiniband/core/sysfs.c:1441
 add_one_compat_dev+0x4f7/0x6e0 drivers/infiniband/core/device.c:969
 add_compat_devs drivers/infiniband/core/device.c:1027 [inline]
 enable_device_and_get+0x32b/0x450 drivers/infiniband/core/device.c:1338
 ib_register_device+0x1153/0x1450 drivers/infiniband/core/device.c:1420
 rxe_register_device+0x25d/0x360 drivers/infiniband/sw/rxe/rxe_verbs.c:1138
 rxe_net_add+0x73/0xd0 drivers/infiniband/sw/rxe/rxe_net.c:521
 rxe_newlink+0x6b/0xf0 drivers/infiniband/sw/rxe/rxe.c:195
 nldev_newlink+0x4b0/0x520 drivers/infiniband/core/nldev.c:1717
 rdma_nl_rcv_skb drivers/infiniband/core/netlink.c:239 [inline]
 rdma_nl_rcv+0x6e3/0xa40 drivers/infiniband/core/netlink.c:259
 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
 netlink_unicast+0x7e7/0x9c0 net/netlink/af_netlink.c:1345
 netlink_sendmsg+0x9b3/0xcd0 net/netlink/af_netlink.c:1921
 sock_sendmsg_nosec net/socket.c:714 [inline]
 sock_sendmsg net/socket.c:734 [inline]
 ____sys_sendmsg+0x597/0x8e0 net/socket.c:2482
 ___sys_sendmsg net/socket.c:2536 [inline]
 __sys_sendmsg+0x28e/0x390 net/socket.c:2565
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

The buggy address belongs to the object at ffff88806f0bc0e8
 which belongs to the cache kernfs_node_cache of size 168
The buggy address is located 8 bytes to the right of
 168-byte region [ffff88806f0bc0e8, ffff88806f0bc190)

The buggy address belongs to the physical page:
page:ffffea0001bc2f00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x6f0bc
flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000200 0000000000000000 dead000000000122 ffff8880121dbc80
raw: 0000000000000000 0000000000110011 00000001ffffffff 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 0x112cc0(GFP_USER|__GFP_NOWARN|__GFP_NORETRY), pid 6486, tgid 6479 (syz-executor.3), ts 449247057697, free_ts 427871267677
 prep_new_page mm/page_alloc.c:2532 [inline]
 get_page_from_freelist+0x72b/0x7a0 mm/page_alloc.c:4283
 __alloc_pages+0x259/0x560 mm/page_alloc.c:5549
 alloc_slab_page+0x70/0xf0 mm/slub.c:1829
 allocate_slab+0x5e/0x520 mm/slub.c:1974
 new_slab mm/slub.c:2034 [inline]
 ___slab_alloc+0x42e/0xce0 mm/slub.c:3036
 __slab_alloc mm/slub.c:3123 [inline]
 slab_alloc_node mm/slub.c:3214 [inline]
 slab_alloc mm/slub.c:3256 [inline]
 __kmem_cache_alloc_lru mm/slub.c:3263 [inline]
 kmem_cache_alloc+0x25d/0x310 mm/slub.c:3273
 kmem_cache_zalloc include/linux/slab.h:723 [inline]
 __kernfs_new_node+0xdb/0x730 fs/kernfs/dir.c:593
 kernfs_new_node+0x95/0x160 fs/kernfs/dir.c:655
 __kernfs_create_file+0x45/0x2e0 fs/kernfs/file.c:1050
 sysfs_add_file_mode_ns+0x21d/0x330 fs/sysfs/file.c:294
 create_files fs/sysfs/group.c:64 [inline]
 internal_create_group+0x55c/0xf50 fs/sysfs/group.c:148
 internal_create_groups fs/sysfs/group.c:188 [inline]
 sysfs_create_groups+0x5d/0x130 fs/sysfs/group.c:214
 setup_gid_attrs drivers/infiniband/core/sysfs.c:1169 [inline]
 ib_setup_port_attrs+0x14bd/0x22a0 drivers/infiniband/core/sysfs.c:1441
 add_one_compat_dev+0x4f7/0x6e0 drivers/infiniband/core/device.c:969
 add_compat_devs drivers/infiniband/core/device.c:1027 [inline]
 enable_device_and_get+0x32b/0x450 drivers/infiniband/core/device.c:1338
 ib_register_device+0x1153/0x1450 drivers/infiniband/core/device.c:1420
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1449 [inline]
 free_pcp_prepare+0x812/0x900 mm/page_alloc.c:1499
 free_unref_page_prepare mm/page_alloc.c:3380 [inline]
 free_unref_page+0x7d/0x630 mm/page_alloc.c:3476
 __vunmap+0x867/0x9d0 mm/vmalloc.c:2696
 htab_free_elems kernel/bpf/hashtab.c:293 [inline]
 prealloc_destroy kernel/bpf/hashtab.c:383 [inline]
 htab_map_free+0x8e2/0xb90 kernel/bpf/hashtab.c:1486
 process_one_work+0x81c/0xd10 kernel/workqueue.c:2289
 worker_thread+0xb14/0x1330 kernel/workqueue.c:2436
 kthread+0x266/0x300 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306

Memory state around the buggy address:
 ffff88806f0bc080: 00 00 00 00 00 fc fc fc fc fc fc fc fc 00 00 00
 ffff88806f0bc100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff88806f0bc180: 00 00 fc fc fc fc fc fc fc fc 00 00 00 00 00 00
                            ^
 ffff88806f0bc200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
 ffff88806f0bc280: fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 00
==================================================================

Crashes (52):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-smack-root 2022/09/28 03:16 upstream 46452d3786a8 75c78242 .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2022/09/23 21:49 upstream 1707c39ae309 0042f2b4 .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2022/09/14 00:31 upstream d1221cea11fc b884348d .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2022/09/05 12:14 upstream 7e18e42e4b28 922294ab .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2022/08/25 18:02 upstream c40e8341e3b3 9b5bf4cd .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2022/07/26 04:44 upstream e0dccc3b76fb 34795c51 .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2022/07/24 21:41 upstream af2c9ac24019 22343af4 .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2022/07/18 15:40 upstream ff6992735ade ff988920 .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2022/07/12 19:14 upstream 72a8e05d4f66 d91dd8ea .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2022/07/11 13:23 upstream 32346491ddf2 da3d6955 .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2022/07/10 02:18 upstream b1c428b6c368 b5765a15 .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2022/06/16 17:18 upstream 30306f6194ca 1719ee24 .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2022/06/05 19:56 upstream 44688ffd111a c8857892 .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2022/06/02 00:20 upstream 8171acb8bc9b b4bc6a3d .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2022/05/26 01:48 upstream 7e062cda7d90 3037caa9 .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2022/05/10 12:43 upstream 9be9ed2612b5 8b277b8e .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2022/04/29 16:33 upstream 38d741cb70b3 44a5ca63 .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2022/04/05 19:35 upstream ce4c854ee868 0127c10f .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2022/03/31 13:49 upstream 787af64d05cd c4c32d8c .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2022/03/28 01:17 upstream f82da161ea75 89bc8608 .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2022/03/26 06:34 upstream 52d543b5497c 89bc8608 .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2022/03/25 17:14 upstream 34af78c4e616 89bc8608 .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2022/03/19 22:22 upstream 97e9c8eb4bb1 e2d91b1d .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2022/02/28 23:35 upstream 719fce7539cd 45a13a73 .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2022/02/18 07:22 upstream 9195e5e0adbb 3cd800e4 .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2022/02/01 12:34 upstream 26291c54e111 c1c1631d .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2022/01/30 16:29 upstream 24f4db1f3a27 495e00c5 .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2022/01/28 08:22 upstream 23a46422c561 495e00c5 .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2022/01/11 22:32 upstream 6f38be8f2ccd 44d1319a .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2022/01/10 22:21 upstream 133d9c53c9dc ddb0ab8c .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2022/01/09 13:33 upstream 4634129ad9fd 2ca0d385 .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2022/01/06 13:21 upstream 75acfdb6fd92 6acc789a .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2021/12/30 06:18 upstream eec4df26e24e 6cc879d4 .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2021/10/31 11:28 upstream 180eca540ae0 098b5d53 .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2021/10/25 07:20 upstream 87066fdd2e30 4f0000ee .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2021/10/05 17:04 upstream f6274b06e326 0a63fd36 .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2021/10/01 07:01 upstream 4de593fb965f 1d849ab4 .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2021/09/06 15:42 upstream 0319b848b155 6ca60148 .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2021/08/22 19:53 upstream 1bdc3d5be7e1 b599f2fc .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2021/08/19 06:17 upstream d6d09a694205 a2fe1cb5 .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2021/08/16 13:35 upstream 7c60610d4767 33c26cb7 .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2021/08/10 11:25 upstream 9a73fa375d58 6972b106 .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2021/07/22 15:03 upstream 3d5895cd3517 302e51de .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2021/06/12 00:27 upstream f21b807c3cf8 1ba81399 .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2021/06/06 10:51 upstream f5b6eb1e0182 500c2339 .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2021/05/30 17:06 upstream b90e90f40b4f 325a8dab .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2021/04/14 01:33 upstream eebe426d32e1 a184b83e .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2021/04/08 01:29 upstream 3a22981230f9 6a81331a .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2021/04/03 19:38 upstream 57fbdb15ec42 6a81331a .config log report info KASAN: slab-out-of-bounds Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2022/03/09 10:55 upstream 330f4c53d3c2 9e8eaa75 .config log report info KASAN: use-after-free Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2021/10/03 23:44 upstream 9e1ff307c779 db0f5787 .config log report info KASAN: use-after-free Read in reiserfs_xattr_get
ci-upstream-kasan-gce-smack-root 2021/07/08 03:29 upstream 3dbdb38e2869 95793bce .config log report info KASAN: use-after-free Read in reiserfs_xattr_get
* Struck through repros no longer work on HEAD.