cve-2022-49891
Vulnerability from cvelistv5
Published
2025-05-01 14:10
Modified
2025-05-04 08:47
Severity ?
Summary
tracing: kprobe: Fix memory leak in test_gen_kprobe/kretprobe_cmd()
Impacted products
LinuxLinux
LinuxLinux
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "kernel/trace/kprobe_event_gen_test.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "bef08acbe560a926b4cee9cc46404cc98ae5703b",
              "status": "affected",
              "version": "64836248dda20c8e7427b493f7e06d9bf8f58850",
              "versionType": "git"
            },
            {
              "lessThan": "d1b6a8e3414aeaa0985139180c145d2d0fbd2a49",
              "status": "affected",
              "version": "64836248dda20c8e7427b493f7e06d9bf8f58850",
              "versionType": "git"
            },
            {
              "lessThan": "71aeb8d01a8c7ab5cf7da3f81b35206f56ce6bca",
              "status": "affected",
              "version": "64836248dda20c8e7427b493f7e06d9bf8f58850",
              "versionType": "git"
            },
            {
              "lessThan": "66f0919c953ef7b55e5ab94389a013da2ce80a2c",
              "status": "affected",
              "version": "64836248dda20c8e7427b493f7e06d9bf8f58850",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "kernel/trace/kprobe_event_gen_test.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "5.6"
            },
            {
              "lessThan": "5.6",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.154",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.78",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.0.*",
              "status": "unaffected",
              "version": "6.0.8",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.1",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.10.154",
                  "versionStartIncluding": "5.6",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.78",
                  "versionStartIncluding": "5.6",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.0.8",
                  "versionStartIncluding": "5.6",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1",
                  "versionStartIncluding": "5.6",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ntracing: kprobe: Fix memory leak in test_gen_kprobe/kretprobe_cmd()\n\ntest_gen_kprobe_cmd() only free buf in fail path, hence buf will leak\nwhen there is no failure. Move kfree(buf) from fail path to common path\nto prevent the memleak. The same reason and solution in\ntest_gen_kretprobe_cmd().\n\nunreferenced object 0xffff888143b14000 (size 2048):\n  comm \"insmod\", pid 52490, jiffies 4301890980 (age 40.553s)\n  hex dump (first 32 bytes):\n    70 3a 6b 70 72 6f 62 65 73 2f 67 65 6e 5f 6b 70  p:kprobes/gen_kp\n    72 6f 62 65 5f 74 65 73 74 20 64 6f 5f 73 79 73  robe_test do_sys\n  backtrace:\n    [\u003c000000006d7b836b\u003e] kmalloc_trace+0x27/0xa0\n    [\u003c0000000009528b5b\u003e] 0xffffffffa059006f\n    [\u003c000000008408b580\u003e] do_one_initcall+0x87/0x2a0\n    [\u003c00000000c4980a7e\u003e] do_init_module+0xdf/0x320\n    [\u003c00000000d775aad0\u003e] load_module+0x3006/0x3390\n    [\u003c00000000e9a74b80\u003e] __do_sys_finit_module+0x113/0x1b0\n    [\u003c000000003726480d\u003e] do_syscall_64+0x35/0x80\n    [\u003c000000003441e93b\u003e] entry_SYSCALL_64_after_hwframe+0x46/0xb0"
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-05-04T08:47:54.692Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/bef08acbe560a926b4cee9cc46404cc98ae5703b"
        },
        {
          "url": "https://git.kernel.org/stable/c/d1b6a8e3414aeaa0985139180c145d2d0fbd2a49"
        },
        {
          "url": "https://git.kernel.org/stable/c/71aeb8d01a8c7ab5cf7da3f81b35206f56ce6bca"
        },
        {
          "url": "https://git.kernel.org/stable/c/66f0919c953ef7b55e5ab94389a013da2ce80a2c"
        }
      ],
      "title": "tracing: kprobe: Fix memory leak in test_gen_kprobe/kretprobe_cmd()",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2022-49891",
    "datePublished": "2025-05-01T14:10:35.115Z",
    "dateReserved": "2025-05-01T14:05:17.243Z",
    "dateUpdated": "2025-05-04T08:47:54.692Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2022-49891\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-05-01T15:16:14.107\",\"lastModified\":\"2025-05-07T13:19:49.620\",\"vulnStatus\":\"Analyzed\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\ntracing: kprobe: Fix memory leak in test_gen_kprobe/kretprobe_cmd()\\n\\ntest_gen_kprobe_cmd() only free buf in fail path, hence buf will leak\\nwhen there is no failure. Move kfree(buf) from fail path to common path\\nto prevent the memleak. The same reason and solution in\\ntest_gen_kretprobe_cmd().\\n\\nunreferenced object 0xffff888143b14000 (size 2048):\\n  comm \\\"insmod\\\", pid 52490, jiffies 4301890980 (age 40.553s)\\n  hex dump (first 32 bytes):\\n    70 3a 6b 70 72 6f 62 65 73 2f 67 65 6e 5f 6b 70  p:kprobes/gen_kp\\n    72 6f 62 65 5f 74 65 73 74 20 64 6f 5f 73 79 73  robe_test do_sys\\n  backtrace:\\n    [\u003c000000006d7b836b\u003e] kmalloc_trace+0x27/0xa0\\n    [\u003c0000000009528b5b\u003e] 0xffffffffa059006f\\n    [\u003c000000008408b580\u003e] do_one_initcall+0x87/0x2a0\\n    [\u003c00000000c4980a7e\u003e] do_init_module+0xdf/0x320\\n    [\u003c00000000d775aad0\u003e] load_module+0x3006/0x3390\\n    [\u003c00000000e9a74b80\u003e] __do_sys_finit_module+0x113/0x1b0\\n    [\u003c000000003726480d\u003e] do_syscall_64+0x35/0x80\\n    [\u003c000000003441e93b\u003e] entry_SYSCALL_64_after_hwframe+0x46/0xb0\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: rastreo: kprobe: Se corrige la fuga de memoria en test_gen_kprobe/kretprobe_cmd(). test_gen_kprobe_cmd() solo libera b\u00fafer en la ruta de fallo, por lo que el b\u00fafer se filtrar\u00e1 cuando no haya fallo. Se traslada kfree(buf) de la ruta de fallo a la ruta com\u00fan para evitar la fuga de memoria. El mismo motivo y soluci\u00f3n se aplican en test_gen_kretprobe_cmd(). Objeto sin referencia 0xffff888143b14000 (size 2048): comm \\\"insmod\\\", pid 52490, jiffies 4301890980 (age 40.553s) hex dump (first 32 bytes): 70 3a 6b 70 72 6f 62 65 73 2f 67 65 6e 5f 6b 70 p:kprobes/gen_kp 72 6f 62 65 5f 74 65 73 74 20 64 6f 5f 73 79 73 robe_test do_sys backtrace: [\u0026lt;000000006d7b836b\u0026gt;] kmalloc_trace+0x27/0xa0 [\u0026lt;0000000009528b5b\u0026gt;] 0xffffffffa059006f [\u0026lt;000000008408b580\u0026gt;] do_one_initcall+0x87/0x2a0 [\u0026lt;00000000c4980a7e\u0026gt;] do_init_module+0xdf/0x320 [\u0026lt;00000000d775aad0\u0026gt;] load_module+0x3006/0x3390 [\u0026lt;00000000e9a74b80\u0026gt;] __do_sys_finit_module+0x113/0x1b0 [\u0026lt;000000003726480d\u0026gt;] do_syscall_64+0x35/0x80 [\u0026lt;000000003441e93b\u0026gt;] entry_SYSCALL_64_after_hwframe+0x46/0xb0 \"}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H\",\"baseScore\":5.5,\"baseSeverity\":\"MEDIUM\",\"attackVector\":\"LOCAL\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"NONE\",\"integrityImpact\":\"NONE\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":1.8,\"impactScore\":3.6}]},\"weaknesses\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-401\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"5.6\",\"versionEndExcluding\":\"5.10.154\",\"matchCriteriaId\":\"B0DA74CD-D573-4831-8842-4FBB6C0F49AA\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"5.11\",\"versionEndExcluding\":\"5.15.78\",\"matchCriteriaId\":\"AB8B27B9-B41B-42D5-AE67-0A89A8A8EEB1\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"5.16\",\"versionEndExcluding\":\"6.0.8\",\"matchCriteriaId\":\"EC9A754E-625D-42F3-87A7-960D643E2867\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.1:rc1:*:*:*:*:*:*\",\"matchCriteriaId\":\"E7E331DA-1FB0-4DEC-91AC-7DA69D461C11\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.1:rc2:*:*:*:*:*:*\",\"matchCriteriaId\":\"17F0B248-42CF-4AE6-A469-BB1BAE7F4705\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.1:rc3:*:*:*:*:*:*\",\"matchCriteriaId\":\"E2422816-0C14-4B5E-A1E6-A9D776E5C49B\"}]}]}],\"references\":[{\"url\":\"https://git.kernel.org/stable/c/66f0919c953ef7b55e5ab94389a013da2ce80a2c\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/71aeb8d01a8c7ab5cf7da3f81b35206f56ce6bca\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/bef08acbe560a926b4cee9cc46404cc98ae5703b\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/d1b6a8e3414aeaa0985139180c145d2d0fbd2a49\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]}]}}"
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading...

Loading...

Loading...
  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.