Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7AB0F30E844 for ; Tue, 28 Oct 2025 11:50:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761652257; cv=none; b=RKrDngPA4589d/6LWDm4JlXl1FiZadK8n86YkU2FOPJyRr89r5gykSTl7oMXEUzFp2ralWvWFD4ZLVCTKRadpmv794qefoDxzBVoQ21hOb40WkDegB3R5v1Qh/jku7xYSfpSwSF4/UALfFJDILoiJX3YUqAX7sZnqkPoDVfIrZo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761652257; c=relaxed/simple; bh=JNXeTje6O+g6jgIuPJlzMZWj6uDEFkWFwrcjoBMNaLQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=FhPytKa3PpGbGNoSawOJqTuzXz8f26Pwn4dlnZ+XLKtFVYQvy+huuJOy3cPRqas5TvX/iX3Kb6yRyOOQR1mQYKYfQfz1gcNxAgKwcxYrdQjRfMDHT4VCYiA7FZoX+ooVK9CE+kyOoYqtkJg6rs5kR2ZwdExNMITf96fNL9in7f8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=zogIgYlx; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="zogIgYlx" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4CD76C4CEE7; Tue, 28 Oct 2025 11:50:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1761652257; bh=JNXeTje6O+g6jgIuPJlzMZWj6uDEFkWFwrcjoBMNaLQ=; h=From:To:Cc:Subject:Date:Reply-to:From; b=zogIgYlxDoirk98y62dhFoqrLEhUeNANhaxiB1Xsxi32iQziojEztkcd7bhkGC6n9 ao1J29lDMJQHMYpA+PWez0nqyhpNqOh4Y/S4WZWN1JiPTM6JkCPa6p6SfZk3/+vf5p iYZ1sF3zKFKLSdqRBSHdoaDJaxIYLjpDhlcmVWwQ= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-40044: fs: udf: fix OOB read in lengthAllocDescs handling Date: Tue, 28 Oct 2025 12:48:21 +0100 Message-ID: <2025102813-CVE-2025-40044-d9af@gregkh> X-Mailer: git-send-email 2.51.1 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=4755; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=vOEKsa0MvIye2IPa34UGw3lP1uGC46gozuH1Ecrqxgo=; b=owGbwMvMwCRo6H6F97bub03G02pJDJkMa2s133eHdBh5/U35INsjfaB3qpBTlUR3d15WXdHKK zfOST7uiGVhEGRikBVTZPmyjefo/opDil6Gtqdh5rAygQxh4OIUgIl0XmaYK3tV7vqx/SVpFmsl w09pMixX6nNxYpif3Md97UHBufmXw9nSXvcxLzMpXmAAAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: fs: udf: fix OOB read in lengthAllocDescs handling When parsing Allocation Extent Descriptor, lengthAllocDescs comes from on-disk data and must be validated against the block size. Crafted or corrupted images may set lengthAllocDescs so that the total descriptor length (sizeof(allocExtDesc) + lengthAllocDescs) exceeds the buffer, leading udf_update_tag() to call crc_itu_t() on out-of-bounds memory and trigger a KASAN use-after-free read. BUG: KASAN: use-after-free in crc_itu_t+0x1d5/0x2b0 lib/crc-itu-t.c:60 Read of size 1 at addr ffff888041e7d000 by task syz-executor317/5309 CPU: 0 UID: 0 PID: 5309 Comm: syz-executor317 Not tainted 6.12.0-rc4-syzkaller-00261-g850925a8133c #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:377 [inline] print_report+0x169/0x550 mm/kasan/report.c:488 kasan_report+0x143/0x180 mm/kasan/report.c:601 crc_itu_t+0x1d5/0x2b0 lib/crc-itu-t.c:60 udf_update_tag+0x70/0x6a0 fs/udf/misc.c:261 udf_write_aext+0x4d8/0x7b0 fs/udf/inode.c:2179 extent_trunc+0x2f7/0x4a0 fs/udf/truncate.c:46 udf_truncate_tail_extent+0x527/0x7e0 fs/udf/truncate.c:106 udf_release_file+0xc1/0x120 fs/udf/file.c:185 __fput+0x23f/0x880 fs/file_table.c:431 task_work_run+0x24f/0x310 kernel/task_work.c:239 exit_task_work include/linux/task_work.h:43 [inline] do_exit+0xa2f/0x28e0 kernel/exit.c:939 do_group_exit+0x207/0x2c0 kernel/exit.c:1088 __do_sys_exit_group kernel/exit.c:1099 [inline] __se_sys_exit_group kernel/exit.c:1097 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1097 x64_sys_call+0x2634/0x2640 arch/x86/include/generated/asm/syscalls_64.h:232 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Validate the computed total length against epos->bh->b_size. Found by Linux Verification Center (linuxtesting.org) with Syzkaller. The Linux kernel CVE team has assigned CVE-2025-40044 to this issue. Affected and fixed versions =========================== Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 5.15.195 with commit 1d1847812a1a5375c10a2a779338df643f79c047 Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 6.1.156 with commit 918649364fbca7d5df72522ca795479edcd25f91 Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 6.6.112 with commit a70dcfa8d0a0cc530a6af59483dfca260b652c1b Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 6.12.53 with commit b57f2d7d3e6bb89ed82330c5fe106cdfa34d3e24 Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 6.17.3 with commit 459404f858213967ccfff336c41747d8dd186d38 Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 6.18-rc1 with commit 3bd5e45c2ce30e239d596becd5db720f7eb83c99 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2025-40044 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: fs/udf/inode.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/1d1847812a1a5375c10a2a779338df643f79c047 https://git.kernel.org/stable/c/918649364fbca7d5df72522ca795479edcd25f91 https://git.kernel.org/stable/c/a70dcfa8d0a0cc530a6af59483dfca260b652c1b https://git.kernel.org/stable/c/b57f2d7d3e6bb89ed82330c5fe106cdfa34d3e24 https://git.kernel.org/stable/c/459404f858213967ccfff336c41747d8dd186d38 https://git.kernel.org/stable/c/3bd5e45c2ce30e239d596becd5db720f7eb83c99