# CVE-2023-53468: ubifs: Fix memory leak in alloc_wbufs()

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.17%, higher than 6% of CVEs (2026-12-01)
- Published: 2025-10-01T11:42:38.673Z
- Modified: 2026-06-17T06:45:24.653Z
- Weaknesses: CWE-401
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

ubifs: Fix memory leak in alloc_wbufs()

kmemleak reported a sequence of memory leaks, and show them as following:

  unreferenced object 0xffff8881575f8400 (size 1024):
    comm "mount", pid 19625, jiffies 4297119604 (age 20.383s)
    hex dump (first 32 bytes):
      00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
      00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    backtrace:
      [<ffffffff8176cecd>] __kmalloc+0x4d/0x150
      [<ffffffffa0406b2b>] ubifs_mount+0x307b/0x7170 [ubifs]
      [<ffffffff819fa8fd>] legacy_get_tree+0xed/0x1d0
      [<ffffffff81936f2d>] vfs_get_tree+0x7d/0x230
      [<ffffffff819b2bd4>] path_mount+0xdd4/0x17b0
      [<ffffffff819b37aa>] __x64_sys_mount+0x1fa/0x270
      [<ffffffff83c14295>] do_syscall_64+0x35/0x80
      [<ffffffff83e0006a>] entry_SYSCALL_64_after_hwframe+0x46/0xb0

  unreferenced object 0xffff8881798a6e00 (size 512):
    comm "mount", pid 19677, jiffies 4297121912 (age 37.816s)
    hex dump (first 32 bytes):
      6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b  kkkkkkkkkkkkkkkk
      6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b  kkkkkkkkkkkkkkkk
    backtrace:
      [<ffffffff8176cecd>] __kmalloc+0x4d/0x150
      [<ffffffffa0418342>] ubifs_wbuf_init+0x52/0x480 [ubifs]
      [<ffffffffa0406ca5>] ubifs_mount+0x31f5/0x7170 [ubifs]
      [<ffffffff819fa8fd>] legacy_get_tree+0xed/0x1d0
      [<ffffffff81936f2d>] vfs_get_tree+0x7d/0x230
      [<ffffffff819b2bd4>] path_mount+0xdd4/0x17b0
      [<ffffffff819b37aa>] __x64_sys_mount+0x1fa/0x270
      [<ffffffff83c14295>] do_syscall_64+0x35/0x80
      [<ffffffff83e0006a>] entry_SYSCALL_64_after_hwframe+0x46/0xb0

The problem is that the ubifs_wbuf_init() returns an error in the
loop which in the alloc_wbufs(), then the wbuf->buf and wbuf->inodes
that were successfully alloced before are not freed.

Fix it by adding error hanging path in alloc_wbufs() which frees
the memory alloced before when ubifs_wbuf_init() returns an error.

(As written by CVE List.)

## Affected

- Linux Linux: from 1e51764a3c2ac05a23a22b2a95ddee4d9bffb16d before 1f206002c6bc302bface871ef3f72c0bbcaa931c; from 1e51764a3c2ac05a23a22b2a95ddee4d9bffb16d before bf50229494f0443b3f08427d7df63e5a7e2a796a; from 1e51764a3c2ac05a23a22b2a95ddee4d9bffb16d before 3e29634eb56e6547272fe4e568f63421f8b3b9fa; from 1e51764a3c2ac05a23a22b2a95ddee4d9bffb16d before 26ec45f1c504e15268383019df139d7983f1e67f; from 1e51764a3c2ac05a23a22b2a95ddee4d9bffb16d before e11f36d3bc4d23f620754a948fe7b82b63dcb185; from 1e51764a3c2ac05a23a22b2a95ddee4d9bffb16d before 4a1ff3c5d04b9079b4f768d9a71b51c4af578dd2; 2.6.27 (not affected: before 2.6.27; from 5.4.235 up to 5.4.*; from 5.10.173 up to 5.10.*; from 5.15.100 up to 5.15.*; from 6.1.18 up to 6.1.*; from 6.2.5 up to 6.2.*; from 6.3 up to *)
- linux linux_kernel: from 2.6.27 before 5.4.235; from 5.5 before 5.10.173; from 5.11 before 5.15.100; from 5.16 before 6.1.18; from 6.2 before 6.2.5

## References

- <https://git.kernel.org/stable/c/1f206002c6bc302bface871ef3f72c0bbcaa931c> (patch)
- <https://git.kernel.org/stable/c/bf50229494f0443b3f08427d7df63e5a7e2a796a> (patch)
- <https://git.kernel.org/stable/c/3e29634eb56e6547272fe4e568f63421f8b3b9fa> (patch)
- <https://git.kernel.org/stable/c/26ec45f1c504e15268383019df139d7983f1e67f> (patch)
- <https://git.kernel.org/stable/c/e11f36d3bc4d23f620754a948fe7b82b63dcb185> (patch)
- <https://git.kernel.org/stable/c/4a1ff3c5d04b9079b4f768d9a71b51c4af578dd2> (patch)

## Sources

- CVE List: [CVE-2023-53468](https://www.cve.org/CVERecord?id=CVE-2023-53468), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2023-53468](https://nvd.nist.gov/vuln/detail/CVE-2023-53468), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2023-53468 · Whole record: https://cve.day/CVE-2023-53468.json · Rebuilt by cve.day 2026-11-25T22:58:34.897Z
