Skip to content
Heist/ feed
Back to feed
HighFix available

tracing: Fix potential double free in create_var_ref()

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: tracing: Fix potential double free in create_var_ref() In create_var_ref(), init_var_ref() is called to initialize the fields of variable ref_field, which is allocated in the previous function call to create_hist_field(). Function init_var_ref() allocates the corresponding fields such as ref_field->system, but frees these fields when the function encounters an error. The caller later calls destroy_hist_field() to conduct error handling, which frees the fields and the variable itself. This results in double free of the fields which are already freed in the previous function. Fix this by storing NULL to the corresponding fields when they are freed in init_var_ref().

Products
Kernel
Affected versions
Not specified
Fixed versions
4.19.247, 5.10.121, 5.15.46, 5.17.14, 5.18.3, 5.4.198
CVEs
CVE-2022-49410
Confirmed fixed CVEs
Not specified
Updated in this feed
5 Nov 2026, 03:15 UTC · Revision 1

Source evidence

tracing: Fix potential double free in create_var_ref()

core-osv · Original source

Published 26 Feb 2025, 02:12 UTC

In the Linux kernel, the following vulnerability has been resolved: tracing: Fix potential double free in create_var_ref() In create_var_ref(), init_var_ref() is called to initialize the fields of variable ref_field, which is allocated in the previous function call to create_hist_field(). Function init_var_ref() allocates the corresponding fields such as ref_field->system, but frees these fields when the function encounters an error. The caller later calls destroy_hist_field() to conduct error handling, which frees the fields and the variable itself. This results in double free of the fields which are already freed in the previous function. Fix this by storing NULL to the corresponding fields when they are freed in init_var_ref().

osv:CVE-2022-49410

Kernel

Fixed versions: 4.19.247, 5.4.198, 5.10.121, 5.15.46, 5.17.14, 5.18.3

Complete source record
{
  "id": "3e1eaaf017428041fb881938eea407b0b6718eeea8c0c0928aeb3ef5477795a2",
  "url": "https://osv.dev/vulnerability/CVE-2022-49410",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "tracing: Fix potential double free in create_var_ref()",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: tracing: Fix potential double free in create_var_ref() In create_var_ref(), init_var_ref() is called to initialize the fields of variable ref_field, which is allocated in the previous function call to create_hist_field(). Function init_var_ref() allocates the corresponding fields such as ref_field->system, but frees these fields when the function encounters an error. The caller later calls destroy_hist_field() to conduct error handling, which frees the fields and the variable itself. This results in double free of the fields which are already freed in the previous function. Fix this by storing NULL to the corresponding fields when they are freed in init_var_ref().",
    "evidence": "osv:CVE-2022-49410",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "4.19.247",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.4.198",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.10.121",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.15.46",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.17.14",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.18.3",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "high",
    "structured": {
      "id": "CVE-2022-49410",
      "aliases": [
        "CVE-2022-49410"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "067fe038e70f6e64960d26a79c4df5f1413d0f13"
                },
                {
                  "fixed": "f8b383f83cb573152c577eca1ef101e89995b72a"
                },
                {
                  "fixed": "c27f744ceefadc7bbeb14233b6abc150ced617d2"
                },
                {
                  "fixed": "058cb6d86b9789377216c936506b346aaa1eb581"
                },
                {
                  "fixed": "37443b3508b8cce6832f8d25cb4550b2f7801f50"
                },
                {
                  "fixed": "4fdfb15e08598711dbf50daf56a33965232daf0e"
                },
                {
                  "fixed": "bd83ff3bbfb003832481c9bff999d12385f396ae"
                },
                {
                  "fixed": "99696a2592bca641eb88cc9a80c90e591afebd0f"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49410.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "4.17.0"
                },
                {
                  "fixed": "4.19.247"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "4.20.0"
                },
                {
                  "fixed": "5.4.198"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.5.0"
                },
                {
                  "fixed": "5.10.121"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.11.0"
                },
                {
                  "fixed": "5.15.46"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "5.17.14"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.18.0"
                },
                {
                  "fixed": "5.18.3"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49410.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:42.077943708Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/058cb6d86b9789377216c936506b346aaa1eb581",
        "https://git.kernel.org/stable/c/37443b3508b8cce6832f8d25cb4550b2f7801f50",
        "https://git.kernel.org/stable/c/4fdfb15e08598711dbf50daf56a33965232daf0e",
        "https://git.kernel.org/stable/c/99696a2592bca641eb88cc9a80c90e591afebd0f",
        "https://git.kernel.org/stable/c/bd83ff3bbfb003832481c9bff999d12385f396ae",
        "https://git.kernel.org/stable/c/c27f744ceefadc7bbeb14233b6abc150ced617d2",
        "https://git.kernel.org/stable/c/f8b383f83cb573152c577eca1ef101e89995b72a",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49410.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2022-49410",
        "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/49xxx/CVE-2022-49410.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2022-49410",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 509764,
  "published_at": "2025-02-26T02:12:33.124+00:00"
}