{"id":"CVE-2026-46078","state":"PUBLISHED","title":"erofs: fix the out-of-bounds nameoff handling for trailing dirents","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nerofs: fix the out-of-bounds nameoff handling for trailing dirents\n\nCurrently we already have boundary-checks for nameoffs, but the trailing\ndirents are special since the namelens are calculated with strnlen()\nwith unchecked nameoffs.\n\nIf a crafted EROFS has a trailing dirent with nameoff >= maxsize,\nmaxsize - nameoff can underflow, causing strnlen() to read past the\ndirectory block.\n\nnameoff0 should also be verified to be a multiple of\n`sizeof(struct erofs_dirent)` as well [1].\n\n[1] https://sashiko.dev/#/patchset/20260416063511.3173774-1-hsiangkao%40linux.alibaba.com","publishedAt":"2026-05-27T12:58:11.916Z","updatedAt":"2026-10-19T19:26:43.106Z","severity":{"score":7.1,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"3aa8ec716e52c02360457fa018296629b4d0becf","status":"affected","lessThan":"a8ee527807f7d97e55ce2ef2906f7f34975eb1c7","versionType":"git"},{"version":"3aa8ec716e52c02360457fa018296629b4d0becf","status":"affected","lessThan":"aa16dca1b062355181ef215229eeac249d7c0d61","versionType":"git"},{"version":"3aa8ec716e52c02360457fa018296629b4d0becf","status":"affected","lessThan":"80a23c6d1aba35be8746d74ac14e6ba5ae46da21","versionType":"git"},{"version":"3aa8ec716e52c02360457fa018296629b4d0becf","status":"affected","lessThan":"222055e6b4063abd2d9e13c3d49bbd1724c50789","versionType":"git"},{"version":"3aa8ec716e52c02360457fa018296629b4d0becf","status":"affected","lessThan":"48b27a955d22391c7f30169fa7b6b2e1977f1ce4","versionType":"git"},{"version":"3aa8ec716e52c02360457fa018296629b4d0becf","status":"affected","lessThan":"8ebb951a284b7446e025afc7dc5e9516ef9a7214","versionType":"git"},{"version":"3aa8ec716e52c02360457fa018296629b4d0becf","status":"affected","lessThan":"1d55445226c75ddd4e78b09b3e7d99109b28c366","versionType":"git"},{"version":"3aa8ec716e52c02360457fa018296629b4d0becf","status":"affected","lessThan":"d18a3b5d337fa412a38e776e6b4b857a58836575","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/erofs/dir.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.19","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.19","versionType":"semver"},{"version":"5.10.259","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.210","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.175","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.140","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.86","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.27","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.0.4","status":"unaffected","lessThanOrEqual":"7.0.*","versionType":"semver"},{"version":"7.1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/erofs/dir.c"]}],"references":["https://git.kernel.org/stable/c/a8ee527807f7d97e55ce2ef2906f7f34975eb1c7","https://git.kernel.org/stable/c/aa16dca1b062355181ef215229eeac249d7c0d61","https://git.kernel.org/stable/c/80a23c6d1aba35be8746d74ac14e6ba5ae46da21","https://git.kernel.org/stable/c/222055e6b4063abd2d9e13c3d49bbd1724c50789","https://git.kernel.org/stable/c/48b27a955d22391c7f30169fa7b6b2e1977f1ce4","https://git.kernel.org/stable/c/8ebb951a284b7446e025afc7dc5e9516ef9a7214","https://git.kernel.org/stable/c/1d55445226c75ddd4e78b09b3e7d99109b28c366","https://git.kernel.org/stable/c/d18a3b5d337fa412a38e776e6b4b857a58836575"],"weaknesses":["CWE-125"],"ingestedAt":"2026-10-29T20:12:07.131Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/46xxx/CVE-2026-46078.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-46078","state":"PUBLISHED","datePublished":"2026-05-27T12:58:11.916Z","dateUpdated":"2026-10-19T19:26:43.106Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-05-13T15:03:33.096Z"},"containers":{"cna":{"title":"erofs: fix the out-of-bounds nameoff handling for trailing dirents","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nerofs: fix the out-of-bounds nameoff handling for trailing dirents\n\nCurrently we already have boundary-checks for nameoffs, but the trailing\ndirents are special since the namelens are calculated with strnlen()\nwith unchecked nameoffs.\n\nIf a crafted EROFS has a trailing dirent with nameoff >= maxsize,\nmaxsize - nameoff can underflow, causing strnlen() to read past the\ndirectory block.\n\nnameoff0 should also be verified to be a multiple of\n`sizeof(struct erofs_dirent)` as well [1].\n\n[1] https://sashiko.dev/#/patchset/20260416063511.3173774-1-hsiangkao%40linux.alibaba.com"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"3aa8ec716e52c02360457fa018296629b4d0becf","status":"affected","lessThan":"a8ee527807f7d97e55ce2ef2906f7f34975eb1c7","versionType":"git"},{"version":"3aa8ec716e52c02360457fa018296629b4d0becf","status":"affected","lessThan":"aa16dca1b062355181ef215229eeac249d7c0d61","versionType":"git"},{"version":"3aa8ec716e52c02360457fa018296629b4d0becf","status":"affected","lessThan":"80a23c6d1aba35be8746d74ac14e6ba5ae46da21","versionType":"git"},{"version":"3aa8ec716e52c02360457fa018296629b4d0becf","status":"affected","lessThan":"222055e6b4063abd2d9e13c3d49bbd1724c50789","versionType":"git"},{"version":"3aa8ec716e52c02360457fa018296629b4d0becf","status":"affected","lessThan":"48b27a955d22391c7f30169fa7b6b2e1977f1ce4","versionType":"git"},{"version":"3aa8ec716e52c02360457fa018296629b4d0becf","status":"affected","lessThan":"8ebb951a284b7446e025afc7dc5e9516ef9a7214","versionType":"git"},{"version":"3aa8ec716e52c02360457fa018296629b4d0becf","status":"affected","lessThan":"1d55445226c75ddd4e78b09b3e7d99109b28c366","versionType":"git"},{"version":"3aa8ec716e52c02360457fa018296629b4d0becf","status":"affected","lessThan":"d18a3b5d337fa412a38e776e6b4b857a58836575","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/erofs/dir.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.19","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.19","versionType":"semver"},{"version":"5.10.259","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.210","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.175","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.140","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.86","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.27","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.0.4","status":"unaffected","lessThanOrEqual":"7.0.*","versionType":"semver"},{"version":"7.1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/erofs/dir.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/a8ee527807f7d97e55ce2ef2906f7f34975eb1c7"},{"url":"https://git.kernel.org/stable/c/aa16dca1b062355181ef215229eeac249d7c0d61"},{"url":"https://git.kernel.org/stable/c/80a23c6d1aba35be8746d74ac14e6ba5ae46da21"},{"url":"https://git.kernel.org/stable/c/222055e6b4063abd2d9e13c3d49bbd1724c50789"},{"url":"https://git.kernel.org/stable/c/48b27a955d22391c7f30169fa7b6b2e1977f1ce4"},{"url":"https://git.kernel.org/stable/c/8ebb951a284b7446e025afc7dc5e9516ef9a7214"},{"url":"https://git.kernel.org/stable/c/1d55445226c75ddd4e78b09b3e7d99109b28c366"},{"url":"https://git.kernel.org/stable/c/d18a3b5d337fa412a38e776e6b4b857a58836575"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H","baseScore":7.1,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The flaw is triggered by parsing a maliciously crafted EROFS filesystem image during a directory read; the data is processed locally after the image is presented (file/loop/removable media), with no network reachability for the readdir path.\nAC:L - An attacker fully controls the on-disk `nameoff` field of the trailing dirent in the crafted image, so the unsigned underflow and resulting out-of-bounds `strnlen` are reproduced deterministically every time the directory is read.\nPR:N - Once the crafted image is mounted, triggering the bug requires only an ordinary directory listing (getdents/readdir), which needs no special privileges; this matches the sibling crafted-image EROFS CVE-2026-43166.\nUI:R - EROFS lacks FS_USERNS_MOUNT and requires CAP_SYS_ADMIN to mount, so a separate user/automounter must mount the attacker-supplied image before the vulnerable readdir path can execute.\nS:U - The out-of-bounds access stays within the kernel's own memory and security authority; there is no crossing of a VM, IOMMU, or sandbox boundary.\nC:H - The underflowed length drives an unbounded `strnlen` that reads kernel memory far past the directory-block buffer; per the OOB-read guidance this unbounded read is High.\nI:N - The defect is strictly a read (strnlen over adjacent memory); no out-of-bounds write, use-after-free, or type confusion occurs, so no data can be modified.\nA:H - Scanning up to ~4 GB past the buffer readily walks into unmapped memory, producing a kernel oops/panic and denial of service."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T12:29:31.009Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.19","versionEndExcluding":"5.10.259"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.19","versionEndExcluding":"5.15.210"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.19","versionEndExcluding":"6.1.175"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.19","versionEndExcluding":"6.6.140"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.19","versionEndExcluding":"6.12.86"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.19","versionEndExcluding":"6.18.27"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.19","versionEndExcluding":"7.0.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.19","versionEndExcluding":"7.1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2026-46078","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2026-10-16T15:19:29.931334Z"}}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-125","lang":"en","type":"CWE","description":"CWE-125 Out-of-bounds Read"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-19T19:26:43.106Z"}}]}}}