CVE-2022-50074 (GCVE-0-2022-50074)

Vulnerability from cvelistv5 – Published: 2025-06-18 11:02 – Updated: 2025-06-18 11:02
VLAI?
Title
apparmor: Fix memleak in aa_simple_write_to_buffer()
Summary
In the Linux kernel, the following vulnerability has been resolved: apparmor: Fix memleak in aa_simple_write_to_buffer() When copy_from_user failed, the memory is freed by kvfree. however the management struct and data blob are allocated independently, so only kvfree(data) cause a memleak issue here. Use aa_put_loaddata(data) to fix this issue.
Severity ?
No CVSS data available.
Assigner
Impacted products
Vendor Product Version
Linux Linux Affected: a6a52579e52b55448326db88bd9a5740e7c1a037 , < 6500eb3a48ac221051b1791818a1ac74744ef617 (git)
Affected: a6a52579e52b55448326db88bd9a5740e7c1a037 , < 7db182a2ebeefded86fea542fcc5d6a68bb77f58 (git)
Affected: a6a52579e52b55448326db88bd9a5740e7c1a037 , < 8aab4295582eb397a125d2788b829fa62b88dbf7 (git)
Affected: a6a52579e52b55448326db88bd9a5740e7c1a037 , < bf7ebebce2c25071c719fd8a2f1307e0c243c2d7 (git)
Affected: a6a52579e52b55448326db88bd9a5740e7c1a037 , < 6583edbf459de2e06b9759f264c0ae27e452b97a (git)
Affected: a6a52579e52b55448326db88bd9a5740e7c1a037 , < 417ea9fe972d2654a268ad66e89c8fcae67017c3 (git)
Create a notification for this product.
    Linux Linux Affected: 4.17
Unaffected: 0 , < 4.17 (semver)
Unaffected: 4.19.256 , ≤ 4.19.* (semver)
Unaffected: 5.4.211 , ≤ 5.4.* (semver)
Unaffected: 5.10.138 , ≤ 5.10.* (semver)
Unaffected: 5.15.63 , ≤ 5.15.* (semver)
Unaffected: 5.19.4 , ≤ 5.19.* (semver)
Unaffected: 6.0 , ≤ * (original_commit_for_fix)
Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "security/apparmor/apparmorfs.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "6500eb3a48ac221051b1791818a1ac74744ef617",
              "status": "affected",
              "version": "a6a52579e52b55448326db88bd9a5740e7c1a037",
              "versionType": "git"
            },
            {
              "lessThan": "7db182a2ebeefded86fea542fcc5d6a68bb77f58",
              "status": "affected",
              "version": "a6a52579e52b55448326db88bd9a5740e7c1a037",
              "versionType": "git"
            },
            {
              "lessThan": "8aab4295582eb397a125d2788b829fa62b88dbf7",
              "status": "affected",
              "version": "a6a52579e52b55448326db88bd9a5740e7c1a037",
              "versionType": "git"
            },
            {
              "lessThan": "bf7ebebce2c25071c719fd8a2f1307e0c243c2d7",
              "status": "affected",
              "version": "a6a52579e52b55448326db88bd9a5740e7c1a037",
              "versionType": "git"
            },
            {
              "lessThan": "6583edbf459de2e06b9759f264c0ae27e452b97a",
              "status": "affected",
              "version": "a6a52579e52b55448326db88bd9a5740e7c1a037",
              "versionType": "git"
            },
            {
              "lessThan": "417ea9fe972d2654a268ad66e89c8fcae67017c3",
              "status": "affected",
              "version": "a6a52579e52b55448326db88bd9a5740e7c1a037",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "security/apparmor/apparmorfs.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "4.17"
            },
            {
              "lessThan": "4.17",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "4.19.*",
              "status": "unaffected",
              "version": "4.19.256",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.4.*",
              "status": "unaffected",
              "version": "5.4.211",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.138",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.63",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.19.*",
              "status": "unaffected",
              "version": "5.19.4",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.0",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "4.19.256",
                  "versionStartIncluding": "4.17",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.4.211",
                  "versionStartIncluding": "4.17",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.10.138",
                  "versionStartIncluding": "4.17",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.63",
                  "versionStartIncluding": "4.17",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.19.4",
                  "versionStartIncluding": "4.17",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.0",
                  "versionStartIncluding": "4.17",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\napparmor: Fix memleak in aa_simple_write_to_buffer()\n\nWhen copy_from_user failed, the memory is freed by kvfree. however the\nmanagement struct and data blob are allocated independently, so only\nkvfree(data) cause a memleak issue here. Use aa_put_loaddata(data) to\nfix this issue."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-06-18T11:02:18.140Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/6500eb3a48ac221051b1791818a1ac74744ef617"
        },
        {
          "url": "https://git.kernel.org/stable/c/7db182a2ebeefded86fea542fcc5d6a68bb77f58"
        },
        {
          "url": "https://git.kernel.org/stable/c/8aab4295582eb397a125d2788b829fa62b88dbf7"
        },
        {
          "url": "https://git.kernel.org/stable/c/bf7ebebce2c25071c719fd8a2f1307e0c243c2d7"
        },
        {
          "url": "https://git.kernel.org/stable/c/6583edbf459de2e06b9759f264c0ae27e452b97a"
        },
        {
          "url": "https://git.kernel.org/stable/c/417ea9fe972d2654a268ad66e89c8fcae67017c3"
        }
      ],
      "title": "apparmor: Fix memleak in aa_simple_write_to_buffer()",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2022-50074",
    "datePublished": "2025-06-18T11:02:18.140Z",
    "dateReserved": "2025-06-18T10:57:27.408Z",
    "dateUpdated": "2025-06-18T11:02:18.140Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…