==================================================================
BUG: KASAN: slab-use-after-free in get_max_inline_xattr_value_size+0x369/0x510 fs/ext4/inline.c:62
Read of size 4 at addr ffff88802926f084 by task syz-executor.2/1727

CPU: 1 PID: 1727 Comm: syz-executor.2 Not tainted 6.3.0-rc4-syzkaller-00243-g6ab608fe852b #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/02/2023
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106
 print_address_description mm/kasan/report.c:319 [inline]
 print_report+0x163/0x540 mm/kasan/report.c:430
 kasan_report+0x176/0x1b0 mm/kasan/report.c:536
 get_max_inline_xattr_value_size+0x369/0x510 fs/ext4/inline.c:62
 ext4_get_max_inline_size+0x141/0x200 fs/ext4/inline.c:113
 ext4_prepare_inline_data+0x87/0x1d0 fs/ext4/inline.c:393
 ext4_da_write_inline_data_begin+0x208/0xe40 fs/ext4/inline.c:931
 ext4_da_write_begin+0x4da/0x960 fs/ext4/inode.c:3064
 generic_perform_write+0x300/0x5e0 mm/filemap.c:3926
 ext4_buffered_write_iter+0x122/0x3a0 fs/ext4/file.c:289
 ext4_file_write_iter+0x1d6/0x1930
 call_write_iter include/linux/fs.h:1851 [inline]
 new_sync_write fs/read_write.c:491 [inline]
 vfs_write+0x7b2/0xbb0 fs/read_write.c:584
 ksys_write+0x1a0/0x2c0 fs/read_write.c:637
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fbefc68c0f9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fbefd47d168 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007fbefc7ac050 RCX: 00007fbefc68c0f9
RDX: 0000000000000020 RSI: 0000000020000100 RDI: 0000000000000004
RBP: 00007fbefc6e7b39 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffff4cc912f R14: 00007fbefd47d300 R15: 0000000000022000
 </TASK>

Allocated by task 28903:
 kasan_save_stack mm/kasan/common.c:45 [inline]
 kasan_set_track+0x4f/0x70 mm/kasan/common.c:52
 __kasan_slab_alloc+0x66/0x70 mm/kasan/common.c:328
 kasan_slab_alloc include/linux/kasan.h:186 [inline]
 slab_post_alloc_hook+0x68/0x3a0 mm/slab.h:769
 slab_alloc_node mm/slub.c:3452 [inline]
 kmem_cache_alloc_node+0x157/0x350 mm/slub.c:3497
 __alloc_skb+0x181/0x420 net/core/skbuff.c:596
 alloc_skb include/linux/skbuff.h:1277 [inline]
 nlmsg_new include/net/netlink.h:1003 [inline]
 audit_buffer_alloc kernel/audit.c:1780 [inline]
 audit_log_start+0x174/0xa00 kernel/audit.c:1898
 common_lsm_audit+0xdc/0x1a90 security/lsm_audit.c:449
 smack_log+0x421/0x540 security/smack/smack_access.c:383
 smk_tskacc+0x2ff/0x360 security/smack/smack_access.c:253
 smack_inode_permission+0x2dc/0x380 security/smack/smack_lsm.c:1159
 security_inode_permission+0xa1/0xf0 security/security.c:1354
 may_lookup fs/namei.c:1716 [inline]
 link_path_walk+0x2da/0xe70 fs/namei.c:2263
 path_lookupat+0xa9/0x450 fs/namei.c:2474
 filename_lookup+0x255/0x610 fs/namei.c:2504
 vfs_statx+0x110/0x480 fs/stat.c:238
 vfs_fstatat fs/stat.c:276 [inline]
 __do_sys_newfstatat fs/stat.c:446 [inline]
 __se_sys_newfstatat fs/stat.c:440 [inline]
 __x64_sys_newfstatat+0x14f/0x1d0 fs/stat.c:440
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

Freed by task 27:
 kasan_save_stack mm/kasan/common.c:45 [inline]
 kasan_set_track+0x4f/0x70 mm/kasan/common.c:52
 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:521
 ____kasan_slab_free+0xd6/0x120 mm/kasan/common.c:236
 kasan_slab_free include/linux/kasan.h:162 [inline]
 slab_free_hook mm/slub.c:1781 [inline]
 slab_free_freelist_hook mm/slub.c:1807 [inline]
 slab_free mm/slub.c:3787 [inline]
 kmem_cache_free+0x297/0x520 mm/slub.c:3809
 kauditd_send_queue+0x2a3/0x2f0 kernel/audit.c:756
 kauditd_thread+0x726/0x960 kernel/audit.c:880
 kthread+0x270/0x300 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308

The buggy address belongs to the object at ffff88802926f000
 which belongs to the cache skbuff_head_cache of size 240
The buggy address is located 132 bytes inside of
 freed 240-byte region [ffff88802926f000, ffff88802926f0f0)

The buggy address belongs to the physical page:
page:ffffea0000a49bc0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2926f
anon flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000200 ffff888144a2a500 ffffea0001ae2b40 dead000000000005
raw: 0000000000000000 00000000000c000c 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 0x112820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_HARDWALL), pid 4434, tgid 4434 (udevd), ts 1725859287233, free_ts 1725719272858
 prep_new_page mm/page_alloc.c:2553 [inline]
 get_page_from_freelist+0x3246/0x33c0 mm/page_alloc.c:4326
 __alloc_pages+0x255/0x670 mm/page_alloc.c:5592
 alloc_slab_page+0x6a/0x160 mm/slub.c:1851
 allocate_slab mm/slub.c:1998 [inline]
 new_slab+0x84/0x2f0 mm/slub.c:2051
 ___slab_alloc+0xa85/0x10a0 mm/slub.c:3193
 __slab_alloc mm/slub.c:3292 [inline]
 __slab_alloc_node mm/slub.c:3345 [inline]
 slab_alloc_node mm/slub.c:3442 [inline]
 kmem_cache_alloc_node+0x1f3/0x350 mm/slub.c:3497
 __alloc_skb+0x181/0x420 net/core/skbuff.c:596
 alloc_skb include/linux/skbuff.h:1277 [inline]
 nlmsg_new include/net/netlink.h:1003 [inline]
 audit_buffer_alloc kernel/audit.c:1780 [inline]
 audit_log_start+0x174/0xa00 kernel/audit.c:1898
 common_lsm_audit+0xdc/0x1a90 security/lsm_audit.c:449
 smack_log+0x421/0x540 security/smack/smack_access.c:383
 smk_tskacc+0x2ff/0x360 security/smack/smack_access.c:253
 smack_inode_permission+0x2dc/0x380 security/smack/smack_lsm.c:1159
 security_inode_permission+0xa1/0xf0 security/security.c:1354
 may_lookup fs/namei.c:1716 [inline]
 link_path_walk+0x2da/0xe70 fs/namei.c:2263
 path_openat+0x241/0x3170 fs/namei.c:3711
 do_filp_open+0x234/0x490 fs/namei.c:3742
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1454 [inline]
 free_pcp_prepare mm/page_alloc.c:1504 [inline]
 free_unref_page_prepare+0xe2f/0xe70 mm/page_alloc.c:3388
 free_unref_page+0x37/0x3f0 mm/page_alloc.c:3483
 tlb_batch_list_free mm/mmu_gather.c:113 [inline]
 tlb_finish_mmu+0x11f/0x1f0 mm/mmu_gather.c:394
 exit_mmap+0x2c9/0x850 mm/mmap.c:3042
 __mmput+0x115/0x3c0 kernel/fork.c:1204
 exit_mm+0x227/0x310 kernel/exit.c:563
 do_exit+0x612/0x2290 kernel/exit.c:856
 do_group_exit+0x206/0x2c0 kernel/exit.c:1019
 get_signal+0x1701/0x17e0 kernel/signal.c:2859
 arch_do_signal_or_restart+0x91/0x670 arch/x86/kernel/signal.c:306
 exit_to_user_mode_loop+0x6a/0x100 kernel/entry/common.c:168
 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:204
 __syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline]
 syscall_exit_to_user_mode+0x64/0x280 kernel/entry/common.c:297
 do_syscall_64+0x4d/0xc0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

Memory state around the buggy address:
 ffff88802926ef80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff88802926f000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88802926f080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc
                   ^
 ffff88802926f100: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
 ffff88802926f180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================