Skip to content
Heist/ feed
Back to feed
UnratedFix available

selinux: fix double free of cond_list on error paths

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: selinux: fix double free of cond_list on error paths On error path from cond_read_list() and duplicate_policydb_cond_list() the cond_list_destroy() gets called a second time in caller functions, resulting in NULL pointer deref. Fix this by resetting the cond_list_len to 0 in cond_list_destroy(), making subsequent calls a noop. Also consistently reset the cond_list pointer to NULL after freeing. [PM: fix line lengths in the description]

Products
Kernel
Affected versions
Not specified
Fixed versions
5.10.99, 5.15.22, 5.16.8
CVEs
CVE-2022-48740
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 08:06 UTC · Revision 1

Source evidence

selinux: fix double free of cond_list on error paths

core-osv · Original source

Published 20 Jun 2024, 11:13 UTC

In the Linux kernel, the following vulnerability has been resolved: selinux: fix double free of cond_list on error paths On error path from cond_read_list() and duplicate_policydb_cond_list() the cond_list_destroy() gets called a second time in caller functions, resulting in NULL pointer deref. Fix this by resetting the cond_list_len to 0 in cond_list_destroy(), making subsequent calls a noop. Also consistently reset the cond_list pointer to NULL after freeing. [PM: fix line lengths in the description]

osv:CVE-2022-48740

Kernel

Fixed versions: 5.10.99, 5.15.22, 5.16.8

Complete source record
{
  "id": "e80500dfab409d257714304dcedcfab6495173dd12ac789ab99a2d59022a3c40",
  "url": "https://osv.dev/vulnerability/CVE-2022-48740",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "selinux: fix double free of cond_list on error paths",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: selinux: fix double free of cond_list on error paths On error path from cond_read_list() and duplicate_policydb_cond_list() the cond_list_destroy() gets called a second time in caller functions, resulting in NULL pointer deref. Fix this by resetting the cond_list_len to 0 in cond_list_destroy(), making subsequent calls a noop. Also consistently reset the cond_list pointer to NULL after freeing. [PM: fix line lengths in the description]",
    "evidence": "osv:CVE-2022-48740",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "5.10.99",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.15.22",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.16.8",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2022-48740",
      "aliases": [
        "CVE-2022-48740"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "60abd3181db29ea81742106cc0ac2e27fd05b418"
                },
                {
                  "fixed": "f446089a268c8fc6908488e991d28a9b936293db"
                },
                {
                  "fixed": "70caa32e6d81f45f0702070c0e4dfe945e92fbd7"
                },
                {
                  "fixed": "7ed9cbf7ac0d4ed86b356e1b944304ae9ee450d4"
                },
                {
                  "fixed": "186edf7e368c40d06cf727a1ad14698ea67b74ad"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-48740.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.7.0"
                },
                {
                  "fixed": "5.10.99"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.11.0"
                },
                {
                  "fixed": "5.15.22"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "5.16.8"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-48740.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:27.133770188Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/186edf7e368c40d06cf727a1ad14698ea67b74ad",
        "https://git.kernel.org/stable/c/70caa32e6d81f45f0702070c0e4dfe945e92fbd7",
        "https://git.kernel.org/stable/c/7ed9cbf7ac0d4ed86b356e1b944304ae9ee450d4",
        "https://git.kernel.org/stable/c/f446089a268c8fc6908488e991d28a9b936293db",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/48xxx/CVE-2022-48740.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2022-48740",
        "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/2022/48xxx/CVE-2022-48740.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2022-48740",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 493628,
  "published_at": "2024-06-20T11:13:25.346+00:00"
}