Bug 2347657 (CVE-2022-49388) - CVE-2022-49388 kernel: ubi: ubi_create_volume: Fix use-after-free when volume creation failed
Summary: CVE-2022-49388 kernel: ubi: ubi_create_volume: Fix use-after-free when volume...
Keywords:
Status: NEW
Alias: CVE-2022-49388
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-02-26 03:02 UTC by OSIDB Bzimport
Modified: 2025-02-26 15:39 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2025-02-26 03:02:07 UTC
In the Linux kernel, the following vulnerability has been resolved:

ubi: ubi_create_volume: Fix use-after-free when volume creation failed

There is an use-after-free problem for 'eba_tbl' in ubi_create_volume()'s
error handling path:

  ubi_eba_replace_table(vol, eba_tbl)
    vol->eba_tbl = tbl
out_mapping:
  ubi_eba_destroy_table(eba_tbl)   // Free 'eba_tbl'
out_unlock:
  put_device(&vol->dev)
    vol_release
      kfree(tbl->entries)	  // UAF

Fix it by removing redundant 'eba_tbl' releasing.
Fetch a reproducer in [Link].

Comment 1 Mauro Matteo Cascella 2025-02-26 12:04:57 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025022648-CVE-2022-49388-1025@gregkh/T


Note You need to log in before you can comment on or make changes to this bug.