Skip to content
Heist/ feed
Back to feed
UnratedFix available

ubi: Fix possible null-ptr-deref in ubi_free_volume()

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: ubi: Fix possible null-ptr-deref in ubi_free_volume() It willl cause null-ptr-deref in the following case: uif_init() ubi_add_volume() cdev_add() -> if it fails, call kill_volumes() device_register() kill_volumes() -> if ubi_add_volume() fails call this function ubi_free_volume() cdev_del() device_unregister() -> trying to delete a not added device, it causes null-ptr-deref So in ubi_free_volume(), it delete devices whether they are added or not, it will causes null-ptr-deref. Handle the error case whlie calling ubi_add_volume() to fix this problem. If add volume fails, set the corresponding vol to null, so it can not be accessed in kill_volumes() and release the resource in ubi_add_volume() error path.

Products
Kernel
Affected versions
Not specified
Fixed versions
4.14.308, 4.19.276, 5.10.173, 5.15.100, 5.4.235, 6.1.18, 6.2.5
CVEs
CVE-2023-54087
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 14:05 UTC · Revision 1

Source evidence

ubi: Fix possible null-ptr-deref in ubi_free_volume()

core-osv · Original source

Published 24 Dec 2025, 13:06 UTC

In the Linux kernel, the following vulnerability has been resolved: ubi: Fix possible null-ptr-deref in ubi_free_volume() It willl cause null-ptr-deref in the following case: uif_init() ubi_add_volume() cdev_add() -> if it fails, call kill_volumes() device_register() kill_volumes() -> if ubi_add_volume() fails call this function ubi_free_volume() cdev_del() device_unregister() -> trying to delete a not added device, it causes null-ptr-deref So in ubi_free_volume(), it delete devices whether they are added or not, it will causes null-ptr-deref. Handle the error case whlie calling ubi_add_volume() to fix this problem. If add volume fails, set the corresponding vol to null, so it can not be accessed in kill_volumes() and release the resource in ubi_add_volume() error path.

osv:CVE-2023-54087

Kernel

Fixed versions: 4.14.308, 4.19.276, 5.4.235, 5.10.173, 5.15.100, 6.1.18, 6.2.5

Complete source record
{
  "id": "969073dd9afdecadb08a3d32a4a17b94155aca60b74d158c60da622ced9aebd4",
  "url": "https://osv.dev/vulnerability/CVE-2023-54087",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "ubi: Fix possible null-ptr-deref in ubi_free_volume()",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: ubi: Fix possible null-ptr-deref in ubi_free_volume() It willl cause null-ptr-deref in the following case: uif_init() ubi_add_volume() cdev_add() -> if it fails, call kill_volumes() device_register() kill_volumes() -> if ubi_add_volume() fails call this function ubi_free_volume() cdev_del() device_unregister() -> trying to delete a not added device, it causes null-ptr-deref So in ubi_free_volume(), it delete devices whether they are added or not, it will causes null-ptr-deref. Handle the error case whlie calling ubi_add_volume() to fix this problem. If add volume fails, set the corresponding vol to null, so it can not be accessed in kill_volumes() and release the resource in ubi_add_volume() error path.",
    "evidence": "osv:CVE-2023-54087",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "4.14.308",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "4.19.276",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.4.235",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.10.173",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.15.100",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.1.18",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.2.5",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2023-54087",
      "aliases": [
        "CVE-2023-54087"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "801c135ce73d5df1caf3eca35b66a10824ae0707"
                },
                {
                  "fixed": "5558bcf1c58720ca6e9d6198d921cb3aa337f038"
                },
                {
                  "fixed": "45b2c5ca4d2edae70f19fdb086bd927840c4c309"
                },
                {
                  "fixed": "234c53e57424992e657e6f4acc00d3df0983176f"
                },
                {
                  "fixed": "fcbc795abe7897da4b5d2a6ab5010e36774b00c2"
                },
                {
                  "fixed": "5ec4c8aca5a221756a9007deadfea92795319fee"
                },
                {
                  "fixed": "2ea7195b195009ecf0046e55361f393ba96d02db"
                },
                {
                  "fixed": "9eccdb0760cbcb4427b5303a83a3007de998af51"
                },
                {
                  "fixed": "c15859bfd326c10230f09cb48a17f8a35f190342"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-54087.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "2.6.22"
                },
                {
                  "fixed": "4.14.308"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "4.15.0"
                },
                {
                  "fixed": "4.19.276"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "4.20.0"
                },
                {
                  "fixed": "5.4.235"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.5.0"
                },
                {
                  "fixed": "5.10.173"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.11.0"
                },
                {
                  "fixed": "5.15.100"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "6.1.18"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.2.5"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-54087.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:35.866429054Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/234c53e57424992e657e6f4acc00d3df0983176f",
        "https://git.kernel.org/stable/c/2ea7195b195009ecf0046e55361f393ba96d02db",
        "https://git.kernel.org/stable/c/45b2c5ca4d2edae70f19fdb086bd927840c4c309",
        "https://git.kernel.org/stable/c/5558bcf1c58720ca6e9d6198d921cb3aa337f038",
        "https://git.kernel.org/stable/c/5ec4c8aca5a221756a9007deadfea92795319fee",
        "https://git.kernel.org/stable/c/9eccdb0760cbcb4427b5303a83a3007de998af51",
        "https://git.kernel.org/stable/c/c15859bfd326c10230f09cb48a17f8a35f190342",
        "https://git.kernel.org/stable/c/fcbc795abe7897da4b5d2a6ab5010e36774b00c2",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/54xxx/CVE-2023-54087.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2023-54087",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/54xxx/CVE-2023-54087.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2023-54087",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 503441,
  "published_at": "2025-12-24T13:06:17.555+00:00"
}