In the Linux kernel, the following vulnerability has been resolved:
udf: Fix a slab-out-of-bounds write bug in udffindentry()
Syzbot reported a slab-out-of-bounds Write bug:
BUG: KASAN: slab-out-of-bounds in udffindentry+0x8a5/0x14f0 fs/udf/namei.c:253 Write of size 105 at addr ffff8880123ff896 by task syz-executor323/3610
CPU: 0 PID: 3610 Comm: syz-executor323 Not tainted 6.1.0-rc2-syzkaller-00105-gb229b6ca5abb #0 Hardware name: Google Compute Engine/Google Compute Engine, BIOS Google 10/11/2022 Call Trace: <TASK> _dumpstack lib/dumpstack.c:88 [inline] dumpstacklvl+0x1b1/0x28e lib/dumpstack.c:106 printaddressdescription+0x74/0x340 mm/kasan/report.c:284 printreport+0x107/0x1f0 mm/kasan/report.c:395 kasanreport+0xcd/0x100 mm/kasan/report.c:495 kasancheckrange+0x2a7/0x2e0 mm/kasan/generic.c:189 memcpy+0x3c/0x60 mm/kasan/shadow.c:66 udffindentry+0x8a5/0x14f0 fs/udf/namei.c:253 udflookup+0xef/0x340 fs/udf/namei.c:309 lookupopen fs/namei.c:3391 [inline] openlastlookups fs/namei.c:3481 [inline] pathopenat+0x10e6/0x2df0 fs/namei.c:3710 dofilpopen+0x264/0x4f0 fs/namei.c:3740 dosysopenat2+0x124/0x4e0 fs/open.c:1310 dosysopen fs/open.c:1326 [inline] _dosyscreat fs/open.c:1402 [inline] _sesyscreat fs/open.c:1396 [inline] _x64syscreat+0x11f/0x160 fs/open.c:1396 dosyscallx64 arch/x86/entry/common.c:50 [inline] dosyscall64+0x3d/0xb0 arch/x86/entry/common.c:80 entrySYSCALL64afterhwframe+0x63/0xcd RIP: 0033:0x7ffab0d164d9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffe1a7e6bb8 EFLAGS: 00000246 ORIG_RAX: 0000000000000055 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007ffab0d164d9 RDX: 00007ffab0d164d9 RSI: 0000000000000000 RDI: 0000000020000180 RBP: 00007ffab0cd5a10 R08: 0000000000000000 R09: 0000000000000000 R10: 00005555573552c0 R11: 0000000000000246 R12: 00007ffab0cd5aa0 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 </TASK>
Allocated by task 3610: kasansavestack mm/kasan/common.c:45 [inline] kasansettrack+0x3d/0x60 mm/kasan/common.c:52 _kasankmalloc mm/kasan/common.c:371 [inline] _kasankmalloc+0x97/0xb0 mm/kasan/common.c:380 kmalloc include/linux/slab.h:576 [inline] udffindentry+0x7b6/0x14f0 fs/udf/namei.c:243 udflookup+0xef/0x340 fs/udf/namei.c:309 lookupopen fs/namei.c:3391 [inline] openlastlookups fs/namei.c:3481 [inline] pathopenat+0x10e6/0x2df0 fs/namei.c:3710 dofilpopen+0x264/0x4f0 fs/namei.c:3740 dosysopenat2+0x124/0x4e0 fs/open.c:1310 dosysopen fs/open.c:1326 [inline] _dosyscreat fs/open.c:1402 [inline] _sesyscreat fs/open.c:1396 [inline] _x64syscreat+0x11f/0x160 fs/open.c:1396 dosyscallx64 arch/x86/entry/common.c:50 [inline] dosyscall64+0x3d/0xb0 arch/x86/entry/common.c:80 entrySYSCALL64afterhwframe+0x63/0xcd
The buggy address belongs to the object at ffff8880123ff800 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 150 bytes inside of 256-byte region [ffff8880123ff800, ffff8880123ff900)
The buggy address belongs to the physical page: page:ffffea000048ff80 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x123fe head:ffffea000048ff80 order:1 compoundmapcount:0 compoundpincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea00004b8500 dead000000000003 ffff888012041b40 raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected pageowner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfpmask 0x0(), pid 1, tgid 1 (swapper/0), ts 1841222404, freets 0 createdummystack mm/pageowner.c: ---truncated---
{ "vanir_signatures": [ { "signature_version": "v1", "target": { "function": "udf_find_entry", "file": "fs/udf/namei.c" }, "signature_type": "Function", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c736ed8541605e3a25075bb1cbf8f38cb3083238", "deprecated": false, "digest": { "length": 2890.0, "function_hash": "135862310237506742176474231159384055081" }, "id": "CVE-2022-49846-09150b95" }, { "signature_version": "v1", "target": { "function": "udf_find_entry", "file": "fs/udf/namei.c" }, "signature_type": "Function", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@583fdd98d94acba1e7225e5cc29063aef0741030", "deprecated": false, "digest": { "length": 2896.0, "function_hash": "194189237241213819459085095706805431198" }, "id": "CVE-2022-49846-0e2ab0d8" }, { "signature_version": "v1", "target": { "file": "fs/udf/namei.c" }, "signature_type": "Line", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ac79001b8e603226fab17240a79cb9ef679d3cd9", "deprecated": false, "digest": { "line_hashes": [ "11876322792532366968943434983397105498", "194439604405155614938768866012211804668", "197941785308637839934415784698272736873", "99076474473423746130667371690993184210" ], "threshold": 0.9 }, "id": "CVE-2022-49846-14376926" }, { "signature_version": "v1", "target": { "function": "udf_find_entry", "file": "fs/udf/namei.c" }, "signature_type": "Function", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f1517721c408631f09d54c743aa70cb07fd3eebd", "deprecated": false, "digest": { "length": 2896.0, "function_hash": "194189237241213819459085095706805431198" }, "id": "CVE-2022-49846-165a38a2" }, { "signature_version": "v1", "target": { "file": "fs/udf/namei.c" }, "signature_type": "Line", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7a6051d734f1ed0031e2216f9a538621235c11a4", "deprecated": false, "digest": { "line_hashes": [ "11876322792532366968943434983397105498", "194439604405155614938768866012211804668", "197941785308637839934415784698272736873", "99076474473423746130667371690993184210" ], "threshold": 0.9 }, "id": "CVE-2022-49846-2b8e7e17" }, { "signature_version": "v1", "target": { "file": "fs/udf/namei.c" }, "signature_type": "Line", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c8af247de385ce49afabc3bf1cf4fd455c94bfe8", "deprecated": false, "digest": { "line_hashes": [ "11876322792532366968943434983397105498", "194439604405155614938768866012211804668", "197941785308637839934415784698272736873", "99076474473423746130667371690993184210" ], "threshold": 0.9 }, "id": "CVE-2022-49846-35822aff" }, { "signature_version": "v1", "target": { "function": "udf_find_entry", "file": "fs/udf/namei.c" }, "signature_type": "Function", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d8971f410739a864c537e0ac29344a7b6c450232", "deprecated": false, "digest": { "length": 2902.0, "function_hash": "305985870488490423190253054430160177056" }, "id": "CVE-2022-49846-35e2f960" }, { "signature_version": "v1", "target": { "file": "fs/udf/namei.c" }, "signature_type": "Line", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@583fdd98d94acba1e7225e5cc29063aef0741030", "deprecated": false, "digest": { "line_hashes": [ "11876322792532366968943434983397105498", "194439604405155614938768866012211804668", "197941785308637839934415784698272736873", "99076474473423746130667371690993184210" ], "threshold": 0.9 }, "id": "CVE-2022-49846-4bdc7394" }, { "signature_version": "v1", "target": { "file": "fs/udf/namei.c" }, "signature_type": "Line", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d8971f410739a864c537e0ac29344a7b6c450232", "deprecated": false, "digest": { "line_hashes": [ "11876322792532366968943434983397105498", "194439604405155614938768866012211804668", "197941785308637839934415784698272736873", "99076474473423746130667371690993184210" ], "threshold": 0.9 }, "id": "CVE-2022-49846-695fdab0" }, { "signature_version": "v1", "target": { "file": "fs/udf/namei.c" }, "signature_type": "Line", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f1517721c408631f09d54c743aa70cb07fd3eebd", "deprecated": false, "digest": { "line_hashes": [ "11876322792532366968943434983397105498", "194439604405155614938768866012211804668", "197941785308637839934415784698272736873", "99076474473423746130667371690993184210" ], "threshold": 0.9 }, "id": "CVE-2022-49846-7b269a30" }, { "signature_version": "v1", "target": { "file": "fs/udf/namei.c" }, "signature_type": "Line", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@03f9582a6a2ebd25a440896475c968428c4b63e7", "deprecated": false, "digest": { "line_hashes": [ "11876322792532366968943434983397105498", "194439604405155614938768866012211804668", "197941785308637839934415784698272736873", "99076474473423746130667371690993184210" ], "threshold": 0.9 }, "id": "CVE-2022-49846-7f4e1481" }, { "signature_version": "v1", "target": { "file": "fs/udf/namei.c" }, "signature_type": "Line", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c736ed8541605e3a25075bb1cbf8f38cb3083238", "deprecated": false, "digest": { "line_hashes": [ "11876322792532366968943434983397105498", "194439604405155614938768866012211804668", "197941785308637839934415784698272736873", "99076474473423746130667371690993184210" ], "threshold": 0.9 }, "id": "CVE-2022-49846-cbe7e51e" }, { "signature_version": "v1", "target": { "function": "udf_find_entry", "file": "fs/udf/namei.c" }, "signature_type": "Function", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7a6051d734f1ed0031e2216f9a538621235c11a4", "deprecated": false, "digest": { "length": 2902.0, "function_hash": "305985870488490423190253054430160177056" }, "id": "CVE-2022-49846-e5686089" }, { "signature_version": "v1", "target": { "function": "udf_find_entry", "file": "fs/udf/namei.c" }, "signature_type": "Function", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c8af247de385ce49afabc3bf1cf4fd455c94bfe8", "deprecated": false, "digest": { "length": 2890.0, "function_hash": "135862310237506742176474231159384055081" }, "id": "CVE-2022-49846-edb87088" }, { "signature_version": "v1", "target": { "function": "udf_find_entry", "file": "fs/udf/namei.c" }, "signature_type": "Function", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@03f9582a6a2ebd25a440896475c968428c4b63e7", "deprecated": false, "digest": { "length": 2902.0, "function_hash": "305985870488490423190253054430160177056" }, "id": "CVE-2022-49846-f9be2592" }, { "signature_version": "v1", "target": { "function": "udf_find_entry", "file": "fs/udf/namei.c" }, "signature_type": "Function", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ac79001b8e603226fab17240a79cb9ef679d3cd9", "deprecated": false, "digest": { "length": 2890.0, "function_hash": "135862310237506742176474231159384055081" }, "id": "CVE-2022-49846-ff3f144b" } ] }