{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2023-54050","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2025-12-24T12:21:05.090Z","datePublished":"2025-12-24T12:23:00.366Z","dateUpdated":"2026-08-05T09:16:47.787Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-08-05T09:16:47.787Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nubifs: Fix memleak when insert_old_idx() failed\n\nFollowing process will cause a memleak for copied up znode:\n\ndirty_cow_znode\n  zn = copy_znode(c, znode);\n  err = insert_old_idx(c, zbr->lnum, zbr->offs);\n  if (unlikely(err))\n     return ERR_PTR(err);   // No one refers to zn.\n\nFetch a reproducer in [Link].\n\nFunction copy_znode() is split into 2 parts: resource allocation\nand znode replacement, insert_old_idx() is split in similar way,\nso resource cleanup could be done in error handling path without\ncorrupting metadata(mem & disk).\nIt's okay that old index inserting is put behind of add_idx_dirt(),\nold index is used in layout_leb_in_gaps(), so the two processes do\nnot depend on each other."}],"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 vulnerable path is reached only through local filesystem syscalls (write/create/unlink/rename/truncate) on a mounted UBIFS volume via ubifs_jnl_* → ubifs_tnc_add/remove → lookup_level0_dirty → dirty_cow_znode. No network protocol handler parses remote data into this code.\nAC:L - Both preconditions are attacker-driven: the COW branch is entered by forcing a commit with fsync/sync while doing metadata work, and the GFP_NOFS allocation failure is produced by deliberately induced memory pressure, which is readily achievable by an unprivileged process on the memory-constrained embedded systems where UBIFS is deployed and which simultaneously activates the shrinker path that turns the corruption into a UAF.\nPR:L - Only an unprivileged local user with write access to any directory on the UBIFS mount is needed; there is no capability, namespace, or admin check anywhere between the syscall entry and dirty_cow_znode.\nUI:N - The attacker triggers everything with their own file operations on an already-mounted filesystem; no victim action, no mount by another user, and no special file is required.\nS:U - The corruption is confined to the kernel's own TNC structures and the mounted filesystem; there is no crossing into another security authority such as a hypervisor or IOMMU domain.\nC:H - The dangling zbranch[].znode left after shrink_tnc() frees a child through the orphaned parent yields a use-after-free read of a generic kmalloc slab object, letting the attacker read reclaimed kernel memory through TNC descent and, with a sprayed replacement znode, escalate to arbitrary kernel reads.\nI:H - The same use-after-free gives write access to the freed/reallocated znode (flag setting, key_copy, parent re-pointing), a classic control-flow-hijack primitive, and the truncated commit list plus mis-set cparent additionally corrupt the on-disk index — the commit message itself cites \"corrupting metadata(mem & disk)\".\nA:H - Beyond the znode memory leak, the orphaned root case NULL-derefs in ubifs_tnc_levelorder_next() and runs off the end of ubifs_destroy_tnc_subtree() (oops at shrink or unmount), and the dirty_zn_cnt/parent assertions in get_znodes_to_commit() force the filesystem read-only or BUG() depending on assert_action."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/ubifs/tnc.c"],"versions":[{"version":"1e51764a3c2ac05a23a22b2a95ddee4d9bffb16d","lessThan":"cc29c7216d7f057eb0613b97dc38c7e1962a88d2","status":"affected","versionType":"git"},{"version":"1e51764a3c2ac05a23a22b2a95ddee4d9bffb16d","lessThan":"6f2eee5457bc48b0426dedfd78cdbdea241a6edb","status":"affected","versionType":"git"},{"version":"1e51764a3c2ac05a23a22b2a95ddee4d9bffb16d","lessThan":"66e9f2fb3e753f820bec2a98e8c6387029988320","status":"affected","versionType":"git"},{"version":"1e51764a3c2ac05a23a22b2a95ddee4d9bffb16d","lessThan":"3ae75f82c33fa1b4ca2006b55c84f4ef4a428d4d","status":"affected","versionType":"git"},{"version":"1e51764a3c2ac05a23a22b2a95ddee4d9bffb16d","lessThan":"ef9aac603659e9ffe7d69ae16e3f0fc0991a965b","status":"affected","versionType":"git"},{"version":"1e51764a3c2ac05a23a22b2a95ddee4d9bffb16d","lessThan":"79079cebbeed624b9d01cfcf1e3254ae1a1f6e14","status":"affected","versionType":"git"},{"version":"1e51764a3c2ac05a23a22b2a95ddee4d9bffb16d","lessThan":"a6da0ab9847779e05a7416c7a98148b549de69ef","status":"affected","versionType":"git"},{"version":"1e51764a3c2ac05a23a22b2a95ddee4d9bffb16d","lessThan":"b5fda08ef213352ac2df7447611eb4d383cce929","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/ubifs/tnc.c"],"versions":[{"version":"2.6.27","status":"affected"},{"version":"0","lessThan":"2.6.27","status":"unaffected","versionType":"semver"},{"version":"4.19.283","lessThanOrEqual":"4.19.*","status":"unaffected","versionType":"semver"},{"version":"5.4.243","lessThanOrEqual":"5.4.*","status":"unaffected","versionType":"semver"},{"version":"5.10.180","lessThanOrEqual":"5.10.*","status":"unaffected","versionType":"semver"},{"version":"5.15.111","lessThanOrEqual":"5.15.*","status":"unaffected","versionType":"semver"},{"version":"6.1.28","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.2.15","lessThanOrEqual":"6.2.*","status":"unaffected","versionType":"semver"},{"version":"6.3.2","lessThanOrEqual":"6.3.*","status":"unaffected","versionType":"semver"},{"version":"6.4","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.27","versionEndExcluding":"4.19.283"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.27","versionEndExcluding":"5.4.243"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.27","versionEndExcluding":"5.10.180"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.27","versionEndExcluding":"5.15.111"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.27","versionEndExcluding":"6.1.28"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.27","versionEndExcluding":"6.2.15"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.27","versionEndExcluding":"6.3.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.27","versionEndExcluding":"6.4"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/cc29c7216d7f057eb0613b97dc38c7e1962a88d2"},{"url":"https://git.kernel.org/stable/c/6f2eee5457bc48b0426dedfd78cdbdea241a6edb"},{"url":"https://git.kernel.org/stable/c/66e9f2fb3e753f820bec2a98e8c6387029988320"},{"url":"https://git.kernel.org/stable/c/3ae75f82c33fa1b4ca2006b55c84f4ef4a428d4d"},{"url":"https://git.kernel.org/stable/c/ef9aac603659e9ffe7d69ae16e3f0fc0991a965b"},{"url":"https://git.kernel.org/stable/c/79079cebbeed624b9d01cfcf1e3254ae1a1f6e14"},{"url":"https://git.kernel.org/stable/c/a6da0ab9847779e05a7416c7a98148b549de69ef"},{"url":"https://git.kernel.org/stable/c/b5fda08ef213352ac2df7447611eb4d383cce929"}],"title":"ubifs: Fix memleak when insert_old_idx() failed","x_generator":{"engine":"bippy-1.2.0"}}}}