==================================================================
BUG: KASAN: slab-out-of-bounds in udf_get_filelongad+0x139/0x140
Read of size 4 at addr ffff888027329b58 by task syz-executor.1/5156

CPU: 1 PID: 5156 Comm: syz-executor.1 Not tainted 6.2.0-rc3-syzkaller-00027-g70bfb3a8d661 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
Call Trace:
 <TASK>
 dump_stack_lvl+0x100/0x178
 print_report+0x167/0x46c
 kasan_report+0xbf/0x1e0
 udf_get_filelongad+0x139/0x140
 udf_current_aext+0x1cb/0x980
 udf_next_aext+0x20a/0x3e0
 udf_setsize+0xaae/0x10d0
 udf_setattr+0x4a4/0x5e0
 notify_change+0x7ba/0x1440
 do_truncate+0x13d/0x1f0
 do_sys_ftruncate+0x638/0x720
 do_syscall_64+0x38/0xb0
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f47e307c919
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f47e23fe0c8 EFLAGS: 00000246 ORIG_RAX: 000000000000004d
RAX: ffffffffffffffda RBX: 00007f47e319bf80 RCX: 00007f47e307c919
RDX: 0000000000000000 RSI: 0100000000000000 RDI: 0000000000000005
RBP: 00007f47e30d8ad0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007f47e319bf80 R15: 00007ffca4180728
 </TASK>

Allocated by task 1:
 kasan_save_stack+0x20/0x40
 kasan_set_track+0x25/0x30
 __kasan_kmalloc+0xa5/0xb0
 device_add+0x111e/0x2150
 netdev_register_kobject+0x183/0x3f0
 register_netdevice+0xd4c/0x1630
 register_netdev+0x2f/0x50
 rose_proto_init+0x37e/0x748
 do_one_initcall+0x13f/0x770
 kernel_init_freeable+0x708/0x78f
 kernel_init+0x1c/0x1d0
 ret_from_fork+0x1f/0x30

The buggy address belongs to the object at ffff888027329800
 which belongs to the cache kmalloc-512 of size 512
The buggy address is located 344 bytes to the right of
 512-byte region [ffff888027329800, ffff888027329a00)

The buggy address belongs to the physical page:
page:ffffea00009cca00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x27328
head:ffffea00009cca00 order:2 compound_mapcount:0 subpages_mapcount:0 compound_pincount:0
anon flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 ffff888012441c80 0000000000000000 dead000000000001
raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 22678799528, free_ts 0
 get_page_from_freelist+0x10aa/0x2d40
 __alloc_pages+0x1c8/0x5c0
 alloc_page_interleave+0x1e/0x250
 alloc_pages+0x22a/0x270
 allocate_slab+0x24e/0x340
 ___slab_alloc+0x89a/0x1400
 __slab_alloc.constprop.0+0x56/0xa0
 __kmem_cache_alloc_node+0x128/0x430
 kmalloc_trace+0x25/0x60
 device_add+0x111e/0x2150
 netdev_register_kobject+0x183/0x3f0
 register_netdevice+0xd4c/0x1630
 register_netdev+0x2f/0x50
 rose_proto_init+0x37e/0x748
 do_one_initcall+0x13f/0x770
 kernel_init_freeable+0x708/0x78f
page_owner free stack trace missing

Memory state around the buggy address:
 ffff888027329a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888027329a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888027329b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                                                    ^
 ffff888027329b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888027329c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
