{"answers":{"affected":"It affects 1 product.","exploited":"There is no known exploitation of CVE-2025-38221 in the wild and no public exploit code.","fix":"Apply the vendor's patch.","what":"CVE-2025-38221 is a high-severity memory corruption vulnerability in Linux kernel, published on 4 Jul 2025. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2025-38221 and fix it if it is affected.\n\nWhat it is: CVE-2025-38221 is a high-severity memory corruption vulnerability in Linux kernel, published on 4 Jul 2025. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2025-38221 in the wild and no public exploit code.\n\nAffected product: Linux kernel. No package-level version data is available, so check the vendor advisory linked from the reference page.\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2025-38221/ (Markdown: https://insights.sbomify.com/CVE-2025-38221/index.md)","id":"CVE-2025-38221","markdown":"https://insights.sbomify.com/CVE-2025-38221/index.md","name":"CVE-2025-38221","record":{"aliases":["BELL-CVE-2025-38221","GHSA-m2xx-pr2p-6vvw","UBUNTU-CVE-2025-38221"],"analysis":{"component_type":"kernel","fix_type":"patch","impacts":["denial_of_service"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Linux kernel ext4","requires_auth":"low_privilege","summary":"A local attacker can trigger a kernel crash in the ext4 filesystem by performing specific file operations, causing a denial of service.","user_interaction":"not_required","vuln_class":"memory_corruption"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"Linux","cpe":[{"product":"linux_kernel","vendor":"linux"}],"cvss":{"score":7.1,"severity":"high","source":"nvd","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","version":"3.1"},"cwes":[{"id":"CWE-125","name":"Out-of-bounds Read"}],"description":"In the Linux kernel, the following vulnerability has been resolved:\n\next4: fix out of bounds punch offset\n\nPunching a hole with a start offset that exceeds max_end is not\npermitted and will result in a negative length in the\ntruncate_inode_partial_folio() function while truncating the page cache,\npotentially leading to undesirable consequences.\n\nA simple reproducer:\n\n  truncate -s 9895604649994 /mnt/foo\n  xfs_io -c \"pwrite 8796093022208 4096\" /mnt/foo\n  xfs_io -c \"fpunch 8796093022213 25769803777\" /mnt/foo\n\n  kernel BUG at include/linux/highmem.h:275!\n  Oops: invalid opcode: 0000 [#1] SMP PTI\n  CPU: 3 UID: 0 PID: 710 Comm: xfs_io Not tainted 6.15.0-rc3\n  Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-2.fc40 04/01/2014\n  RIP: 0010:zero_user_segments.constprop.0+0xd7/0x110\n  RSP: 0018:ffffc90001cf3b38 EFLAGS: 00010287\n  RAX: 0000000000000005 RBX: ffffea0001485e40 RCX: 0000000000001000\n  RDX: 000000000040b000 RSI: 0000000000000005 RDI: 000000000040b000\n  RBP: 000000000040affb R08: ffff888000000000 R09: ffffea0000000000\n  R10: 0000000000000003 R11: 00000000fffc7fc5 R12: 0000000000000005\n  R13: 000000000040affb R14: ffffea0001485e40 R15: ffff888031cd3000\n  FS:  00007f4f63d0b780(0000) GS:ffff8880d337d000(0000)\n  knlGS:0000000000000000\n  CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033\n  CR2: 000000001ae0b038 CR3: 00000000536aa000 CR4: 00000000000006f0\n  DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000\n  DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400\n  Call Trace:\n   \u003cTASK\u003e\n   truncate_inode_partial_folio+0x3dd/0x620\n   truncate_inode_pages_range+0x226/0x720\n   ? bdev_getblk+0x52/0x3e0\n   ? ext4_get_group_desc+0x78/0x150\n   ? crc32c_arch+0xfd/0x180\n   ? __ext4_get_inode_loc+0x18c/0x840\n   ? ext4_inode_csum+0x117/0x160\n   ? jbd2_journal_dirty_metadata+0x61/0x390\n   ? __ext4_handle_dirty_metadata+0xa0/0x2b0\n   ? kmem_cache_free+0x90/0x5a0\n   ? jbd2_journal_stop+0x1d5/0x550\n   ? __ext4_journal_stop+0x49/0x100\n   truncate_pagecache_range+0x50/0x80\n   ext4_truncate_page_cache_block_range+0x57/0x3a0\n   ext4_punch_hole+0x1fe/0x670\n   ext4_fallocate+0x792/0x17d0\n   ? __count_memcg_events+0x175/0x2a0\n   vfs_fallocate+0x121/0x560\n   ksys_fallocate+0x51/0xc0\n   __x64_sys_fallocate+0x24/0x40\n   x64_sys_call+0x18d2/0x4170\n   do_syscall_64+0xa7/0x220\n   entry_SYSCALL_64_after_hwframe+0x76/0x7e\n\nFix this by filtering out cases where the punching start offset exceeds\nmax_end.","ecosystems":[],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"ext4: fix out of bounds punch offset","id":"CVE-2025-38221","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":"linux:linux_kernel","products":["linux:linux_kernel"],"type":"memory_corruption","year":"2025"},"n_packages":0,"n_references":3,"next":{"headline":"ext4: inline: fix len overflow in ext4_prepare_inline_data","id":"CVE-2025-38222"},"packages":[],"prev":{"headline":"ext4: only dirty folios when data journaling regular files","id":"CVE-2025-38220"},"products":["Linux"],"published":"2025-07-04","related":[{"cvss_score":8.8,"headline":"Linux Kernel Out-of-Bounds Write","id":"CVE-2026-53266","kev_date_added":"2026-09-18","published":"2026-06-25"},{"cvss_score":8.8,"headline":"Linux Kernel Improper Input Validation","id":"CVE-2013-6282","kev_date_added":"2022-09-15","published":"2013-11-19"},{"cvss_score":8.4,"headline":"Linux Kernel Heap-Based Buffer Overflow","id":"CVE-2022-0185","kev_date_added":"2024-08-21","published":"2022-02-11"},{"cvss_score":8.4,"headline":"Linux Kernel Privilege Escalation","id":"CVE-2013-2094","kev_date_added":"2022-09-15","published":"2013-05-14"},{"cvss_score":7.8,"headline":"Linux Kernel Unspecified","id":"CVE-2026-53362","kev_date_added":"2026-08-27","published":"2026-07-04"},{"cvss_score":7.8,"headline":"Linux Kernel Missing Initialization of a Variable","id":"CVE-2026-46300","kev_date_added":"2026-10-28","published":"2026-05-23"},{"cvss_score":7.8,"headline":"Linux Kernel Race Condition","id":"CVE-2025-39964","kev_date_added":"2026-09-18","published":"2025-10-13"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2026-05-11","vendors":["Linux"]},"summary":"A local attacker can trigger a kernel crash in the ext4 filesystem by performing specific file operations, causing a denial of service.","url":"https://insights.sbomify.com/CVE-2025-38221/"}