CVE-2022-49802 (GCVE-0-2022-49802)
Vulnerability from cvelistv5
Published
2025-05-01 14:09
Modified
2025-05-04 08:45
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: ftrace: Fix null pointer dereference in ftrace_add_mod() The @ftrace_mod is allocated by kzalloc(), so both the members {prev,next} of @ftrace_mode->list are NULL, it's not a valid state to call list_del(). If kstrdup() for @ftrace_mod->{func|module} fails, it goes to @out_free tag and calls free_ftrace_mod() to destroy @ftrace_mod, then list_del() will write prev->next and next->prev, where null pointer dereference happens. BUG: kernel NULL pointer dereference, address: 0000000000000008 Oops: 0002 [#1] PREEMPT SMP NOPTI Call Trace: <TASK> ftrace_mod_callback+0x20d/0x220 ? do_filp_open+0xd9/0x140 ftrace_process_regex.isra.51+0xbf/0x130 ftrace_regex_write.isra.52.part.53+0x6e/0x90 vfs_write+0xee/0x3a0 ? __audit_filter_op+0xb1/0x100 ? auditd_test_task+0x38/0x50 ksys_write+0xa5/0xe0 do_syscall_64+0x3a/0x90 entry_SYSCALL_64_after_hwframe+0x63/0xcd Kernel panic - not syncing: Fatal exception So call INIT_LIST_HEAD() to initialize the list member to fix this issue.
Impacted products
Vendor Product Version
Linux Linux Version: 673feb9d76ab3eddde7acfd94b206e321cfc90b9
Version: 673feb9d76ab3eddde7acfd94b206e321cfc90b9
Version: 673feb9d76ab3eddde7acfd94b206e321cfc90b9
Version: 673feb9d76ab3eddde7acfd94b206e321cfc90b9
Version: 673feb9d76ab3eddde7acfd94b206e321cfc90b9
Version: 673feb9d76ab3eddde7acfd94b206e321cfc90b9
Version: 673feb9d76ab3eddde7acfd94b206e321cfc90b9
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "kernel/trace/ftrace.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "665b4c6648bf2b91f69b33817f4321cf4c3cafe9",
              "status": "affected",
              "version": "673feb9d76ab3eddde7acfd94b206e321cfc90b9",
              "versionType": "git"
            },
            {
              "lessThan": "b5bfc61f541d3f092b13dedcfe000d86eb8e133c",
              "status": "affected",
              "version": "673feb9d76ab3eddde7acfd94b206e321cfc90b9",
              "versionType": "git"
            },
            {
              "lessThan": "f715f31559b82e3f75ce047fa476de63d8107584",
              "status": "affected",
              "version": "673feb9d76ab3eddde7acfd94b206e321cfc90b9",
              "versionType": "git"
            },
            {
              "lessThan": "6a14828caddad0d989495a72af678adf60992704",
              "status": "affected",
              "version": "673feb9d76ab3eddde7acfd94b206e321cfc90b9",
              "versionType": "git"
            },
            {
              "lessThan": "1bea037a1abb23a6729bef36a2265a4565f5ea77",
              "status": "affected",
              "version": "673feb9d76ab3eddde7acfd94b206e321cfc90b9",
              "versionType": "git"
            },
            {
              "lessThan": "6e50eb4b1807017f6c2d5089064256ce2de8aef1",
              "status": "affected",
              "version": "673feb9d76ab3eddde7acfd94b206e321cfc90b9",
              "versionType": "git"
            },
            {
              "lessThan": "19ba6c8af9382c4c05dc6a0a79af3013b9a35cd0",
              "status": "affected",
              "version": "673feb9d76ab3eddde7acfd94b206e321cfc90b9",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "kernel/trace/ftrace.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "4.13"
            },
            {
              "lessThan": "4.13",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "4.14.*",
              "status": "unaffected",
              "version": "4.14.300",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "4.19.*",
              "status": "unaffected",
              "version": "4.19.267",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.4.*",
              "status": "unaffected",
              "version": "5.4.225",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.156",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.80",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.0.*",
              "status": "unaffected",
              "version": "6.0.10",
              "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": "4.14.300",
                  "versionStartIncluding": "4.13",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "4.19.267",
                  "versionStartIncluding": "4.13",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.4.225",
                  "versionStartIncluding": "4.13",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.10.156",
                  "versionStartIncluding": "4.13",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.80",
                  "versionStartIncluding": "4.13",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.0.10",
                  "versionStartIncluding": "4.13",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1",
                  "versionStartIncluding": "4.13",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nftrace: Fix null pointer dereference in ftrace_add_mod()\n\nThe @ftrace_mod is allocated by kzalloc(), so both the members {prev,next}\nof @ftrace_mode-\u003elist are NULL, it\u0027s not a valid state to call list_del().\nIf kstrdup() for @ftrace_mod-\u003e{func|module} fails, it goes to @out_free\ntag and calls free_ftrace_mod() to destroy @ftrace_mod, then list_del()\nwill write prev-\u003enext and next-\u003eprev, where null pointer dereference\nhappens.\n\nBUG: kernel NULL pointer dereference, address: 0000000000000008\nOops: 0002 [#1] PREEMPT SMP NOPTI\nCall Trace:\n \u003cTASK\u003e\n ftrace_mod_callback+0x20d/0x220\n ? do_filp_open+0xd9/0x140\n ftrace_process_regex.isra.51+0xbf/0x130\n ftrace_regex_write.isra.52.part.53+0x6e/0x90\n vfs_write+0xee/0x3a0\n ? __audit_filter_op+0xb1/0x100\n ? auditd_test_task+0x38/0x50\n ksys_write+0xa5/0xe0\n do_syscall_64+0x3a/0x90\n entry_SYSCALL_64_after_hwframe+0x63/0xcd\nKernel panic - not syncing: Fatal exception\n\nSo call INIT_LIST_HEAD() to initialize the list member to fix this issue."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-05-04T08:45:39.803Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/665b4c6648bf2b91f69b33817f4321cf4c3cafe9"
        },
        {
          "url": "https://git.kernel.org/stable/c/b5bfc61f541d3f092b13dedcfe000d86eb8e133c"
        },
        {
          "url": "https://git.kernel.org/stable/c/f715f31559b82e3f75ce047fa476de63d8107584"
        },
        {
          "url": "https://git.kernel.org/stable/c/6a14828caddad0d989495a72af678adf60992704"
        },
        {
          "url": "https://git.kernel.org/stable/c/1bea037a1abb23a6729bef36a2265a4565f5ea77"
        },
        {
          "url": "https://git.kernel.org/stable/c/6e50eb4b1807017f6c2d5089064256ce2de8aef1"
        },
        {
          "url": "https://git.kernel.org/stable/c/19ba6c8af9382c4c05dc6a0a79af3013b9a35cd0"
        }
      ],
      "title": "ftrace: Fix null pointer dereference in ftrace_add_mod()",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2022-49802",
    "datePublished": "2025-05-01T14:09:30.308Z",
    "dateReserved": "2025-05-01T14:05:17.225Z",
    "dateUpdated": "2025-05-04T08:45:39.803Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2022-49802\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-05-01T15:16:03.510\",\"lastModified\":\"2025-11-07T19:02:52.853\",\"vulnStatus\":\"Analyzed\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nftrace: Fix null pointer dereference in ftrace_add_mod()\\n\\nThe @ftrace_mod is allocated by kzalloc(), so both the members {prev,next}\\nof @ftrace_mode-\u003elist are NULL, it\u0027s not a valid state to call list_del().\\nIf kstrdup() for @ftrace_mod-\u003e{func|module} fails, it goes to @out_free\\ntag and calls free_ftrace_mod() to destroy @ftrace_mod, then list_del()\\nwill write prev-\u003enext and next-\u003eprev, where null pointer dereference\\nhappens.\\n\\nBUG: kernel NULL pointer dereference, address: 0000000000000008\\nOops: 0002 [#1] PREEMPT SMP NOPTI\\nCall Trace:\\n \u003cTASK\u003e\\n ftrace_mod_callback+0x20d/0x220\\n ? do_filp_open+0xd9/0x140\\n ftrace_process_regex.isra.51+0xbf/0x130\\n ftrace_regex_write.isra.52.part.53+0x6e/0x90\\n vfs_write+0xee/0x3a0\\n ? __audit_filter_op+0xb1/0x100\\n ? auditd_test_task+0x38/0x50\\n ksys_write+0xa5/0xe0\\n do_syscall_64+0x3a/0x90\\n entry_SYSCALL_64_after_hwframe+0x63/0xcd\\nKernel panic - not syncing: Fatal exception\\n\\nSo call INIT_LIST_HEAD() to initialize the list member to fix this issue.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: ftrace: Corregir la desreferencia de puntero nulo en ftrace_add_mod() @ftrace_mod se asigna mediante kzalloc(), por lo que ambos miembros {prev,next} de @ftrace_mode-\u0026gt;list son NULL, no es un estado v\u00e1lido para llamar a list_del(). Si kstrdup() para @ftrace_mod-\u0026gt;{func|module} falla, va a la etiqueta @out_free y llama a free_ftrace_mod() para destruir @ftrace_mod, entonces list_del() escribir\u00e1 prev-\u0026gt;next y next-\u0026gt;prev, donde ocurre la desreferencia de puntero nulo. ERROR: desreferencia de puntero NULL del kernel, direcci\u00f3n: 0000000000000008 Oops: 0002 [#1] PREEMPT SMP NOPTI Call Trace:  ftrace_mod_callback+0x20d/0x220 ? P\u00e1nico del kernel: no se sincroniza: Excepci\u00f3n fatal Por lo tanto, llame a INIT_LIST_HEAD() para inicializar el miembro de la lista para corregir este problema.\"}],\"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-476\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"4.13\",\"versionEndExcluding\":\"4.14.300\",\"matchCriteriaId\":\"54EE50B0-1627-4AE1-AA1F-5709B28EA1D0\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"4.15\",\"versionEndExcluding\":\"4.19.267\",\"matchCriteriaId\":\"A5C69A12-68E2-400E-9A5A-375A673C8402\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"4.20\",\"versionEndExcluding\":\"5.4.225\",\"matchCriteriaId\":\"94D21814-3051-4860-AB06-C7880A3D4933\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"5.5\",\"versionEndExcluding\":\"5.10.156\",\"matchCriteriaId\":\"E2152F3D-E6D3-405D-B0BE-911B8B6E2EE6\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"5.11\",\"versionEndExcluding\":\"5.15.80\",\"matchCriteriaId\":\"51BBEF3B-79F5-4D4C-ADBA-F34DA0E2465C\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"5.16\",\"versionEndExcluding\":\"6.0.10\",\"matchCriteriaId\":\"64F9ADD1-3ADB-4D66-A00F-4A83010B05F0\"},{\"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\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.1:rc4:*:*:*:*:*:*\",\"matchCriteriaId\":\"1C6E00FE-5FB9-4D20-A1A1-5A32128F9B76\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.1:rc5:*:*:*:*:*:*\",\"matchCriteriaId\":\"35B26BE4-43A6-4A36-A7F6-5B3F572D9186\"}]}]}],\"references\":[{\"url\":\"https://git.kernel.org/stable/c/19ba6c8af9382c4c05dc6a0a79af3013b9a35cd0\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/1bea037a1abb23a6729bef36a2265a4565f5ea77\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/665b4c6648bf2b91f69b33817f4321cf4c3cafe9\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/6a14828caddad0d989495a72af678adf60992704\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/6e50eb4b1807017f6c2d5089064256ce2de8aef1\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/b5bfc61f541d3f092b13dedcfe000d86eb8e133c\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/f715f31559b82e3f75ce047fa476de63d8107584\",\"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…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • 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.


Loading…

Loading…