{"id":"CVE-2023-54087","aliases":["CVE-2023-54087"],"related":[],"kind":"vulnerability","state":"published","title":"ubi: Fix possible null-ptr-deref in ubi_free_volume()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nubi: Fix possible null-ptr-deref in ubi_free_volume()\n\nIt willl cause null-ptr-deref in the following case:\n\nuif_init()\n  ubi_add_volume()\n    cdev_add() -> if it fails, call kill_volumes()\n    device_register()\n\nkill_volumes() -> if ubi_add_volume() fails call this function\n  ubi_free_volume()\n    cdev_del()\n    device_unregister() -> trying to delete a not added device,\n\t\t\t   it causes null-ptr-deref\n\nSo in ubi_free_volume(), it delete devices whether they are added\nor not, it will causes null-ptr-deref.\n\nHandle the error case whlie calling ubi_add_volume() to fix this\nproblem. If add volume fails, set the corresponding vol to null,\nso it can not be accessed in kill_volumes() and release the\nresource in ubi_add_volume() error path.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nubi: Fix possible null-ptr-deref in ubi_free_volume()\n\nIt willl cause null-ptr-deref in the following case:\n\nuif_init()\n  ubi_add_volume()\n    cdev_add() -> if it fails, call kill_volumes()\n    device_register()\n\nkill_volumes() -> if ubi_add_volume() fails call this function\n  ubi_free_volume()\n    cdev_del()\n    device_unregister() -> trying to delete a not added device,\n\t\t\t   it causes null-ptr-deref\n\nSo in ubi_free_volume(), it delete devices whether they are added\nor not, it will causes null-ptr-deref.\n\nHandle the error case whlie calling ubi_add_volume() to fix this\nproblem. If add volume fails, set the corresponding vol to null,\nso it can not be accessed in kill_volumes() and release the\nresource in ubi_add_volume() error path.","source":"cvelist"}],"published":"2025-12-24T13:06:17.555Z","modified":"2026-06-17T06:46:46.730Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"801c135ce73d5df1caf3eca35b66a10824ae0707","fixed":"5558bcf1c58720ca6e9d6198d921cb3aa337f038","status":"affected"},{"type":"git","introduced":"801c135ce73d5df1caf3eca35b66a10824ae0707","fixed":"45b2c5ca4d2edae70f19fdb086bd927840c4c309","status":"affected"},{"type":"git","introduced":"801c135ce73d5df1caf3eca35b66a10824ae0707","fixed":"234c53e57424992e657e6f4acc00d3df0983176f","status":"affected"},{"type":"git","introduced":"801c135ce73d5df1caf3eca35b66a10824ae0707","fixed":"fcbc795abe7897da4b5d2a6ab5010e36774b00c2","status":"affected"},{"type":"git","introduced":"801c135ce73d5df1caf3eca35b66a10824ae0707","fixed":"5ec4c8aca5a221756a9007deadfea92795319fee","status":"affected"},{"type":"git","introduced":"801c135ce73d5df1caf3eca35b66a10824ae0707","fixed":"2ea7195b195009ecf0046e55361f393ba96d02db","status":"affected"},{"type":"git","introduced":"801c135ce73d5df1caf3eca35b66a10824ae0707","fixed":"9eccdb0760cbcb4427b5303a83a3007de998af51","status":"affected"},{"type":"git","introduced":"801c135ce73d5df1caf3eca35b66a10824ae0707","fixed":"c15859bfd326c10230f09cb48a17f8a35f190342","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"2.6.22","status":"affected"},{"type":"semver","introduced":"0","fixed":"2.6.22","status":"unaffected"},{"type":"semver","introduced":"4.14.308","lastAffected":"4.14.*","status":"unaffected"},{"type":"semver","introduced":"4.19.276","lastAffected":"4.19.*","status":"unaffected"},{"type":"semver","introduced":"5.4.235","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.173","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.100","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.18","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.2.5","lastAffected":"6.2.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.3","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/5558bcf1c58720ca6e9d6198d921cb3aa337f038","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/45b2c5ca4d2edae70f19fdb086bd927840c4c309","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/234c53e57424992e657e6f4acc00d3df0983176f","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/fcbc795abe7897da4b5d2a6ab5010e36774b00c2","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/5ec4c8aca5a221756a9007deadfea92795319fee","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/2ea7195b195009ecf0046e55361f393ba96d02db","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9eccdb0760cbcb4427b5303a83a3007de998af51","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/c15859bfd326c10230f09cb48a17f8a35f190342","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-54087","url":"https://www.cve.org/CVERecord?id=CVE-2023-54087","licence":"CVE Terms of Use","modified":"2026-05-11T19:55:14.333Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-54087","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-54087","licence":"Public domain","modified":"2026-06-17T06:46:46.730Z"}],"updatedAt":"2026-11-25T22:58:35.170Z","epss":{"score":0.00237,"percentile":0.15759,"date":"2026-12-01T12:00:22.000Z"}}