{"id":"CVE-2023-54042","state":"PUBLISHED","title":"powerpc/64s: Fix VAS mm use after free","description":"In the Linux kernel, the following vulnerability has been resolved:\n\npowerpc/64s: Fix VAS mm use after free\n\nThe refcount on mm is dropped before the coprocessor is detached.","publishedAt":"2025-12-24T10:56:07.565Z","updatedAt":"2026-10-15T21:41:38.268Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"7bc6f71bdff5f8921e324da0a8fad6f4e2e63a85","status":"affected","lessThan":"f7d92313002b2d543500cc417d8079aaed1fb0a8","versionType":"git"},{"version":"7bc6f71bdff5f8921e324da0a8fad6f4e2e63a85","status":"affected","lessThan":"4e82f92c349ea603736ade1e814861c0182a55ad","versionType":"git"},{"version":"7bc6f71bdff5f8921e324da0a8fad6f4e2e63a85","status":"affected","lessThan":"db8657fdd53c5e3069149d7f957cb60e63027bb2","versionType":"git"},{"version":"7bc6f71bdff5f8921e324da0a8fad6f4e2e63a85","status":"affected","lessThan":"421cd1544480f2458042fe7f4913a2069c4d7251","versionType":"git"},{"version":"7bc6f71bdff5f8921e324da0a8fad6f4e2e63a85","status":"affected","lessThan":"b4bda59b47879cce38a6ec5a01cd3cac702b5331","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/powerpc/platforms/powernv/vas-window.c","arch/powerpc/platforms/pseries/vas.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.14","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.14","versionType":"semver"},{"version":"5.15.121","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.39","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.3.13","status":"unaffected","lessThanOrEqual":"6.3.*","versionType":"semver"},{"version":"6.4.4","status":"unaffected","lessThanOrEqual":"6.4.*","versionType":"semver"},{"version":"6.5","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/powerpc/platforms/powernv/vas-window.c","arch/powerpc/platforms/pseries/vas.c"]}],"references":["https://git.kernel.org/stable/c/f7d92313002b2d543500cc417d8079aaed1fb0a8","https://git.kernel.org/stable/c/4e82f92c349ea603736ade1e814861c0182a55ad","https://git.kernel.org/stable/c/db8657fdd53c5e3069149d7f957cb60e63027bb2","https://git.kernel.org/stable/c/421cd1544480f2458042fe7f4913a2069c4d7251","https://git.kernel.org/stable/c/b4bda59b47879cce38a6ec5a01cd3cac702b5331"],"weaknesses":[],"ingestedAt":"2026-10-29T20:06:42.242Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2023/54xxx/CVE-2023-54042.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2023-54042","state":"PUBLISHED","datePublished":"2025-12-24T10:56:07.565Z","dateUpdated":"2026-10-15T21:41:38.268Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-12-24T10:53:46.181Z"},"containers":{"cna":{"title":"powerpc/64s: Fix VAS mm use after free","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\npowerpc/64s: Fix VAS mm use after free\n\nThe refcount on mm is dropped before the coprocessor is detached."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"7bc6f71bdff5f8921e324da0a8fad6f4e2e63a85","status":"affected","lessThan":"f7d92313002b2d543500cc417d8079aaed1fb0a8","versionType":"git"},{"version":"7bc6f71bdff5f8921e324da0a8fad6f4e2e63a85","status":"affected","lessThan":"4e82f92c349ea603736ade1e814861c0182a55ad","versionType":"git"},{"version":"7bc6f71bdff5f8921e324da0a8fad6f4e2e63a85","status":"affected","lessThan":"db8657fdd53c5e3069149d7f957cb60e63027bb2","versionType":"git"},{"version":"7bc6f71bdff5f8921e324da0a8fad6f4e2e63a85","status":"affected","lessThan":"421cd1544480f2458042fe7f4913a2069c4d7251","versionType":"git"},{"version":"7bc6f71bdff5f8921e324da0a8fad6f4e2e63a85","status":"affected","lessThan":"b4bda59b47879cce38a6ec5a01cd3cac702b5331","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/powerpc/platforms/powernv/vas-window.c","arch/powerpc/platforms/pseries/vas.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.14","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.14","versionType":"semver"},{"version":"5.15.121","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.39","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.3.13","status":"unaffected","lessThanOrEqual":"6.3.*","versionType":"semver"},{"version":"6.4.4","status":"unaffected","lessThanOrEqual":"6.4.*","versionType":"semver"},{"version":"6.5","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/powerpc/platforms/powernv/vas-window.c","arch/powerpc/platforms/pseries/vas.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/f7d92313002b2d543500cc417d8079aaed1fb0a8"},{"url":"https://git.kernel.org/stable/c/4e82f92c349ea603736ade1e814861c0182a55ad"},{"url":"https://git.kernel.org/stable/c/db8657fdd53c5e3069149d7f957cb60e63027bb2"},{"url":"https://git.kernel.org/stable/c/421cd1544480f2458042fe7f4913a2069c4d7251"},{"url":"https://git.kernel.org/stable/c/b4bda59b47879cce38a6ec5a01cd3cac702b5331"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerability is reached through a local character device (`/dev/crypto/nx-gzip`) via `open()` + `ioctl(VAS_TX_WIN_OPEN)` + process exit/`close()`. No network or adjacent-network path exists to the VAS window close path.\nAC:L - The attacker fully controls the trigger: open a window and exit the process, at which point the VAS reference is deterministically the last `mm_count` reference, so `mmdrop()` frees the mm and the immediately following `mm_context_remove_vas_window()` dereferences it. No unwinnable race or uncontrollable precondition is involved, and the sequence can be repeated freely to groom `mm_cachep` reallocation.\nPR:L - Only an unprivileged local account is needed — there is no `capable()` or `CAP_*` check on any path from the ioctl to `vas_deallocate_window()`/`vas_win_close()`, and `Documentation/powerpc/vas-api.rst` states no special privileges are required to open the nx-gzip device, which is deliberately exposed to ordinary user-space compression libraries.\nUI:N - The attacking process performs every step itself (open, ioctl, exit); no action by another user or administrator is required.\nS:U - The corruption is confined to kernel memory managed by the same kernel security authority; no hypervisor, IOMMU, or sandbox boundary is crossed.\nC:H - The freed `mm_struct` is read after free — `context.id`, `context.copros`, `context.active_cpus`, `mm_users`, and `mm_cpumask()` — and `mm_cachep` objects are readily reallocated by forking, so the attacker can influence the contents read; a UAF of this kind is leverageable for kernel memory disclosure, and the corrupted TLB-flush scoping can leave stale translations exposing another process's memory.\nI:H - Multiple writes land in the freed object: `atomic_dec_if_positive()` on `context.copros`/`context.vas_windows`, plus cross-CPU `atomic_dec(&mm->context.active_cpus)`, `cpumask_clear_cpu()`, and a possible extra `mmdrop_lazy_tlb()` refcount underflow, giving write primitives into a reallocated live `mm_struct` (or SLUB freelist metadata) that are exploitable for further corruption.\nA:H - The use-after-free reliably corrupts freed slab memory and issues hardware TLB invalidations with a stale PID plus IPIs derived from a freed cpumask, producing oopses, `WARN_ON()` splats (fatal with `panic_on_warn`), slab corruption, and kernel panics — triggerable repeatedly by any local user."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T09:16:42.390Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.14","versionEndExcluding":"5.15.121"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.14","versionEndExcluding":"6.1.39"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.14","versionEndExcluding":"6.3.13"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.14","versionEndExcluding":"6.4.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.14","versionEndExcluding":"6.5"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2023-54042","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2026-10-15T21:37:58.217277Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-15T21:41:38.268Z"}}]}}}