CWE-476
AllowedNULL Pointer Dereference
Abstraction: Base · Status: Stable
The product dereferences a pointer that it expects to be valid but is NULL.
6314 vulnerabilities reference this CWE, most recent first.
GHSA-2XCH-4R76-8CGW
Vulnerability from github – Published: 2024-10-21 15:32 – Updated: 2025-11-04 00:31In the Linux kernel, the following vulnerability has been resolved:
KEYS: prevent NULL pointer dereference in find_asymmetric_key()
In find_asymmetric_key(), if all NULLs are passed in the id_{0,1,2} arguments, the kernel will first emit WARN but then have an oops because id_2 gets dereferenced anyway.
Add the missing id_2 check and move WARN_ON() to the final else branch to avoid duplicate NULL checks.
Found by Linux Verification Center (linuxtesting.org) with Svace static analysis tool.
{
"affected": [],
"aliases": [
"CVE-2024-47743"
],
"database_specific": {
"cwe_ids": [
"CWE-476"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-10-21T13:15:04Z",
"severity": "MODERATE"
},
"details": "In the Linux kernel, the following vulnerability has been resolved:\n\nKEYS: prevent NULL pointer dereference in find_asymmetric_key()\n\nIn find_asymmetric_key(), if all NULLs are passed in the id_{0,1,2}\narguments, the kernel will first emit WARN but then have an oops\nbecause id_2 gets dereferenced anyway.\n\nAdd the missing id_2 check and move WARN_ON() to the final else branch\nto avoid duplicate NULL checks.\n\nFound by Linux Verification Center (linuxtesting.org) with Svace static\nanalysis tool.",
"id": "GHSA-2xch-4r76-8cgw",
"modified": "2025-11-04T00:31:38Z",
"published": "2024-10-21T15:32:26Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-47743"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/0d3b0706ada15c333e6f9faf19590ff715e45d1e"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/13b5b401ead95b5d8266f64904086c55b6024900"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/3322fa8f2aa40b0b3651034cd541647a600cc6c0"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/70fd1966c93bf3bfe3fe6d753eb3d83a76597eef"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/a3765b497a4f5224cb2f7a6a2d3357d3066214ee"
},
{
"type": "WEB",
"url": "https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-2XCP-78PQ-JQQ3
Vulnerability from github – Published: 2024-07-29 18:30 – Updated: 2025-10-07 18:31In the Linux kernel, the following vulnerability has been resolved:
drm/xe: Check pat.ops before dumping PAT settings
We may leave pat.ops unset when running on brand new platform or when running as a VF. While the former is unlikely, the latter is valid (future) use case and will cause NPD when someone will try to dump PAT settings by debugfs.
It's better to check pointer to pat.ops instead of specific .dump hook, as we have this hook always defined for every .ops variant.
{
"affected": [],
"aliases": [
"CVE-2024-42091"
],
"database_specific": {
"cwe_ids": [
"CWE-476"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-07-29T18:15:11Z",
"severity": "MODERATE"
},
"details": "In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/xe: Check pat.ops before dumping PAT settings\n\nWe may leave pat.ops unset when running on brand new platform or\nwhen running as a VF. While the former is unlikely, the latter\nis valid (future) use case and will cause NPD when someone will\ntry to dump PAT settings by debugfs.\n\nIt\u0027s better to check pointer to pat.ops instead of specific .dump\nhook, as we have this hook always defined for every .ops variant.",
"id": "GHSA-2xcp-78pq-jqq3",
"modified": "2025-10-07T18:31:01Z",
"published": "2024-07-29T18:30:42Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-42091"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/583ce246c7ff9edeb0de49130cdc3d45db8545cb"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/a918e771e6fbe1fa68932af5b0cdf473e23090cc"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-2XG7-VCHR-Q6Q4
Vulnerability from github – Published: 2021-12-23 00:01 – Updated: 2021-12-29 00:01An Invalid pointer reference vulnerability exists in gpac 1.1.0 via the gf_svg_node_del function, which causes a segmentation fault and application crash.
{
"affected": [],
"aliases": [
"CVE-2021-45259"
],
"database_specific": {
"cwe_ids": [
"CWE-476"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2021-12-22T17:15:00Z",
"severity": "MODERATE"
},
"details": "An Invalid pointer reference vulnerability exists in gpac 1.1.0 via the gf_svg_node_del function, which causes a segmentation fault and application crash.",
"id": "GHSA-2xg7-vchr-q6q4",
"modified": "2021-12-29T00:01:35Z",
"published": "2021-12-23T00:01:29Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-45259"
},
{
"type": "WEB",
"url": "https://github.com/gpac/gpac/issues/1986"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-2XPR-GH65-3JVF
Vulnerability from github – Published: 2026-05-02 09:31 – Updated: 2026-06-01 18:31In the Linux kernel, the following vulnerability has been resolved:
media: vidtv: fix pass-by-value structs causing MSAN warnings
vidtv_ts_null_write_into() and vidtv_ts_pcr_write_into() take their argument structs by value, causing MSAN to report uninit-value warnings. While only vidtv_ts_null_write_into() has triggered a report so far, both functions share the same issue.
Fix by passing both structs by const pointer instead, avoiding the stack copy of the struct along with its MSAN shadow and origin metadata. The functions do not modify the structs, which is enforced by the const qualifier.
{
"affected": [],
"aliases": [
"CVE-2026-43058"
],
"database_specific": {
"cwe_ids": [
"CWE-476"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-05-02T07:16:20Z",
"severity": "MODERATE"
},
"details": "In the Linux kernel, the following vulnerability has been resolved:\n\nmedia: vidtv: fix pass-by-value structs causing MSAN warnings\n\nvidtv_ts_null_write_into() and vidtv_ts_pcr_write_into() take their\nargument structs by value, causing MSAN to report uninit-value warnings.\nWhile only vidtv_ts_null_write_into() has triggered a report so far,\nboth functions share the same issue.\n\nFix by passing both structs by const pointer instead, avoiding the\nstack copy of the struct along with its MSAN shadow and origin metadata.\nThe functions do not modify the structs, which is enforced by the const\nqualifier.",
"id": "GHSA-2xpr-gh65-3jvf",
"modified": "2026-06-01T18:31:28Z",
"published": "2026-05-02T09:31:15Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-43058"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/1b2820c8a9887981634020db19f1a2425558b88e"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/57b01d945ed68cebe486d495dadc4901a96d3aaa"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/5f8e73bde67e931468bc2a1860d78d72f0c6ba41"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/6d75a9ec5bdb8cf8382eaf8f8fe831ba7d58a9d4"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/a73f84a30975e6c4ae06efd500d31c82564dba10"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/a876d72ceba7fe5444005239f363c105767e0ecf"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/be57e52e27c7cbfb400a8f255e475cbcff242baa"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/c034d8094fee474eb94142c17643eee2919079b7"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/e3957eb26a3d570aefc6bb184fa8b8a1e9a4e508"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-2XR3-2R6G-CGX8
Vulnerability from github – Published: 2025-09-16 15:32 – Updated: 2025-12-02 21:31In the Linux kernel, the following vulnerability has been resolved:
drm/msm/dpu: Add a null ptr check for dpu_encoder_needs_modeset
The drm_atomic_get_new_connector_state() can return NULL if the connector is not part of the atomic state. Add a check to prevent a NULL pointer dereference.
This follows the same pattern used in dpu_encoder_update_topology() within the same file, which checks for NULL before using conn_state.
Patchwork: https://patchwork.freedesktop.org/patch/665188/
{
"affected": [],
"aliases": [
"CVE-2025-39820"
],
"database_specific": {
"cwe_ids": [
"CWE-476"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-09-16T13:15:58Z",
"severity": "MODERATE"
},
"details": "In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/msm/dpu: Add a null ptr check for dpu_encoder_needs_modeset\n\nThe drm_atomic_get_new_connector_state() can return NULL if the\nconnector is not part of the atomic state. Add a check to prevent\na NULL pointer dereference.\n\nThis follows the same pattern used in dpu_encoder_update_topology()\nwithin the same file, which checks for NULL before using conn_state.\n\nPatchwork: https://patchwork.freedesktop.org/patch/665188/",
"id": "GHSA-2xr3-2r6g-cgx8",
"modified": "2025-12-02T21:31:27Z",
"published": "2025-09-16T15:32:35Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-39820"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/aaec54254b02f5959c3670177037464d828b2140"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/abebfed208515726760d79cf4f9f1a76b9a10a84"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-322G-PXMJ-97CC
Vulnerability from github – Published: 2022-05-01 23:42 – Updated: 2022-05-01 23:42OpenSSL 0.9.8f and 0.9.8g allows remote attackers to cause a denial of service (crash) via a TLS handshake that omits the Server Key Exchange message and uses "particular cipher suites," which triggers a NULL pointer dereference.
{
"affected": [],
"aliases": [
"CVE-2008-1672"
],
"database_specific": {
"cwe_ids": [
"CWE-476"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2008-05-29T16:32:00Z",
"severity": "MODERATE"
},
"details": "OpenSSL 0.9.8f and 0.9.8g allows remote attackers to cause a denial of service (crash) via a TLS handshake that omits the Server Key Exchange message and uses \"particular cipher suites,\" which triggers a NULL pointer dereference.",
"id": "GHSA-322g-pxmj-97cc",
"modified": "2022-05-01T23:42:23Z",
"published": "2022-05-01T23:42:23Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2008-1672"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/42667"
},
{
"type": "WEB",
"url": "https://www.redhat.com/archives/fedora-package-announce/2008-May/msg01029.html"
},
{
"type": "WEB",
"url": "http://cert.fi/haavoittuvuudet/2008/advisory-openssl.html"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/30405"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/30460"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/30825"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/30852"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/30868"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/31228"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/31288"
},
{
"type": "WEB",
"url": "http://security.gentoo.org/glsa/glsa-200806-08.xml"
},
{
"type": "WEB",
"url": "http://slackware.com/security/viewer.php?l=slackware-security\u0026y=2008\u0026m=slackware-security.562004"
},
{
"type": "WEB",
"url": "http://sourceforge.net/project/shownotes.php?release_id=615606"
},
{
"type": "WEB",
"url": "http://support.nortel.com/go/main.jsp?cscat=BLTNDETAIL\u0026id=738400"
},
{
"type": "WEB",
"url": "http://www.kb.cert.org/vuls/id/520586"
},
{
"type": "WEB",
"url": "http://www.mandriva.com/security/advisories?name=MDVSA-2008:107"
},
{
"type": "WEB",
"url": "http://www.openssl.org/news/secadv_20080528.txt"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/492932/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/29405"
},
{
"type": "WEB",
"url": "http://www.securitytracker.com/id?1020122"
},
{
"type": "WEB",
"url": "http://www.ubuntu.com/usn/usn-620-1"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2008/1680"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2008/1937/references"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-323G-Q36V-HMMC
Vulnerability from github – Published: 2026-05-07 06:31 – Updated: 2026-05-07 06:31Tor before 0.4.9.7 has a NULL pointer dereference when a CERT cell is received out of order, aka TROVE-2026-006.
{
"affected": [],
"aliases": [
"CVE-2026-44602"
],
"database_specific": {
"cwe_ids": [
"CWE-476"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-05-07T04:16:35Z",
"severity": "LOW"
},
"details": "Tor before 0.4.9.7 has a NULL pointer dereference when a CERT cell is received out of order, aka TROVE-2026-006.",
"id": "GHSA-323g-q36v-hmmc",
"modified": "2026-05-07T06:31:42Z",
"published": "2026-05-07T06:31:42Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-44602"
},
{
"type": "WEB",
"url": "https://forum.torproject.org/c/news/tor-release-announcement/28"
},
{
"type": "WEB",
"url": "https://gitlab.torproject.org/tpo/core/tor/-/commit/df7d5174ef41814d806c8ede776e230cd30ac12b"
},
{
"type": "WEB",
"url": "https://gitlab.torproject.org/tpo/core/tor/-/work_items/41240"
},
{
"type": "WEB",
"url": "https://www.openwall.com/lists/oss-security/2026/05/06/8"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L",
"type": "CVSS_V3"
}
]
}
GHSA-3299-Q63P-824W
Vulnerability from github – Published: 2025-04-16 15:34 – Updated: 2026-07-04 12:30In the Linux kernel, the following vulnerability has been resolved:
dlm: prevent NPD when writing a positive value to event_done
do_uevent returns the value written to event_done. In case it is a positive value, new_lockspace would undo all the work, and lockspace would not be set. __dlm_new_lockspace, however, would treat that positive value as a success due to commit 8511a2728ab8 ("dlm: fix use count with multiple joins").
Down the line, device_create_lockspace would pass that NULL lockspace to dlm_find_lockspace_local, leading to a NULL pointer dereference.
Treating such positive values as successes prevents the problem. Given this has been broken for so long, this is unlikely to break userspace expectations.
{
"affected": [],
"aliases": [
"CVE-2025-23131"
],
"database_specific": {
"cwe_ids": [
"CWE-476"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-04-16T15:16:07Z",
"severity": "MODERATE"
},
"details": "In the Linux kernel, the following vulnerability has been resolved:\n\ndlm: prevent NPD when writing a positive value to event_done\n\ndo_uevent returns the value written to event_done. In case it is a\npositive value, new_lockspace would undo all the work, and lockspace\nwould not be set. __dlm_new_lockspace, however, would treat that\npositive value as a success due to commit 8511a2728ab8 (\"dlm: fix use\ncount with multiple joins\").\n\nDown the line, device_create_lockspace would pass that NULL lockspace to\ndlm_find_lockspace_local, leading to a NULL pointer dereference.\n\nTreating such positive values as successes prevents the problem. Given\nthis has been broken for so long, this is unlikely to break userspace\nexpectations.",
"id": "GHSA-3299-q63p-824w",
"modified": "2026-07-04T12:30:27Z",
"published": "2025-04-16T15:34:46Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-23131"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/10b7a59814765d18d43555c9cef4eb3048b7e8a3"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/7109d69bec6edce546dc870e66bd2b668a3d5549"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/8e2bad543eca5c25cd02cbc63d72557934d45f13"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/a1c41aebb184d9228a440dcb6761224e65b0e49a"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/b73c4ad4d387fe5bc988145bd9f1bc0de76afd5c"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/c7837e2c96559663c33f43da403d9cf3cf77cfa7"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/ee28d99d789b077565cbe0377374d1e826c64d93"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-32QX-3229-J5M2
Vulnerability from github – Published: 2022-05-14 01:07 – Updated: 2022-05-14 01:07The Linux kernel before version 4.11 is vulnerable to a NULL pointer dereference in fs/cifs/cifsencrypt.c:setup_ntlmv2_rsp() that allows an attacker controlling a CIFS server to kernel panic a client that has this server mounted, because an empty TargetInfo field in an NTLMSSP setup negotiation response is mishandled during session recovery.
{
"affected": [],
"aliases": [
"CVE-2018-1066"
],
"database_specific": {
"cwe_ids": [
"CWE-476"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2018-03-02T08:29:00Z",
"severity": "HIGH"
},
"details": "The Linux kernel before version 4.11 is vulnerable to a NULL pointer dereference in fs/cifs/cifsencrypt.c:setup_ntlmv2_rsp() that allows an attacker controlling a CIFS server to kernel panic a client that has this server mounted, because an empty TargetInfo field in an NTLMSSP setup negotiation response is mishandled during session recovery.",
"id": "GHSA-32qx-3229-j5m2",
"modified": "2022-05-14T01:07:26Z",
"published": "2022-05-14T01:07:26Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-1066"
},
{
"type": "WEB",
"url": "https://github.com/torvalds/linux/commit/cabfb3680f78981d26c078a26e5c748531257ebb"
},
{
"type": "WEB",
"url": "https://bugzilla.redhat.com/show_bug.cgi?id=1539599"
},
{
"type": "WEB",
"url": "https://lists.debian.org/debian-lts-announce/2018/07/msg00015.html"
},
{
"type": "WEB",
"url": "https://lists.debian.org/debian-lts-announce/2018/07/msg00016.html"
},
{
"type": "WEB",
"url": "https://patchwork.kernel.org/patch/10187633"
},
{
"type": "WEB",
"url": "https://usn.ubuntu.com/3880-1"
},
{
"type": "WEB",
"url": "https://usn.ubuntu.com/3880-2"
},
{
"type": "WEB",
"url": "https://www.debian.org/security/2018/dsa-4187"
},
{
"type": "WEB",
"url": "https://www.debian.org/security/2018/dsa-4188"
},
{
"type": "WEB",
"url": "http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=cabfb3680f78981d26c078a26e5c748531257ebb"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/103378"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-32X8-XHWP-VHG9
Vulnerability from github – Published: 2024-12-27 15:31 – Updated: 2025-11-03 21:32In the Linux kernel, the following vulnerability has been resolved:
usb: gadget: u_serial: Fix the issue that gs_start_io crashed due to accessing null pointer
Considering that in some extreme cases, when u_serial driver is accessed by multiple threads, Thread A is executing the open operation and calling the gs_open, Thread B is executing the disconnect operation and calling the gserial_disconnect function,The port->port_usb pointer will be set to NULL.
E.g. Thread A Thread B gs_open() gadget_unbind_driver() gs_start_io() composite_disconnect() gs_start_rx() gserial_disconnect() ... ... spin_unlock(&port->port_lock) status = usb_ep_queue() spin_lock(&port->port_lock) spin_lock(&port->port_lock) port->port_usb = NULL gs_free_requests(port->port_usb->in) spin_unlock(&port->port_lock) Crash
This causes thread A to access a null pointer (port->port_usb is null) when calling the gs_free_requests function, causing a crash.
If port_usb is NULL, the release request will be skipped as it will be done by gserial_disconnect.
So add a null pointer check to gs_start_io before attempting to access the value of the pointer port->port_usb.
Call trace: gs_start_io+0x164/0x25c gs_open+0x108/0x13c tty_open+0x314/0x638 chrdev_open+0x1b8/0x258 do_dentry_open+0x2c4/0x700 vfs_open+0x2c/0x3c path_openat+0xa64/0xc60 do_filp_open+0xb8/0x164 do_sys_openat2+0x84/0xf0 __arm64_sys_openat+0x70/0x9c invoke_syscall+0x58/0x114 el0_svc_common+0x80/0xe0 do_el0_svc+0x1c/0x28 el0_svc+0x38/0x68
{
"affected": [],
"aliases": [
"CVE-2024-56670"
],
"database_specific": {
"cwe_ids": [
"CWE-476"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-12-27T15:15:26Z",
"severity": "MODERATE"
},
"details": "In the Linux kernel, the following vulnerability has been resolved:\n\nusb: gadget: u_serial: Fix the issue that gs_start_io crashed due to accessing null pointer\n\nConsidering that in some extreme cases,\nwhen u_serial driver is accessed by multiple threads,\nThread A is executing the open operation and calling the gs_open,\nThread B is executing the disconnect operation and calling the\ngserial_disconnect function,The port-\u003eport_usb pointer will be set to NULL.\n\nE.g.\n Thread A Thread B\n gs_open() gadget_unbind_driver()\n gs_start_io() composite_disconnect()\n gs_start_rx() gserial_disconnect()\n ... ...\n spin_unlock(\u0026port-\u003eport_lock)\n status = usb_ep_queue() spin_lock(\u0026port-\u003eport_lock)\n spin_lock(\u0026port-\u003eport_lock) port-\u003eport_usb = NULL\n gs_free_requests(port-\u003eport_usb-\u003ein) spin_unlock(\u0026port-\u003eport_lock)\n Crash\n\nThis causes thread A to access a null pointer (port-\u003eport_usb is null)\nwhen calling the gs_free_requests function, causing a crash.\n\nIf port_usb is NULL, the release request will be skipped as it\nwill be done by gserial_disconnect.\n\nSo add a null pointer check to gs_start_io before attempting\nto access the value of the pointer port-\u003eport_usb.\n\nCall trace:\n gs_start_io+0x164/0x25c\n gs_open+0x108/0x13c\n tty_open+0x314/0x638\n chrdev_open+0x1b8/0x258\n do_dentry_open+0x2c4/0x700\n vfs_open+0x2c/0x3c\n path_openat+0xa64/0xc60\n do_filp_open+0xb8/0x164\n do_sys_openat2+0x84/0xf0\n __arm64_sys_openat+0x70/0x9c\n invoke_syscall+0x58/0x114\n el0_svc_common+0x80/0xe0\n do_el0_svc+0x1c/0x28\n el0_svc+0x38/0x68",
"id": "GHSA-32x8-xhwp-vhg9",
"modified": "2025-11-03T21:32:00Z",
"published": "2024-12-27T15:31:56Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-56670"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/1247e1df086aa6c17ab53cd1bedce70dd7132765"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/28b3c03a6790de1f6f2683919ad657840f0f0f58"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/4cfbca86f6a8b801f3254e0e3c8f2b1d2d64be2b"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/4efdfdc32d8d6307f968cd99f1db64468471bab1"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/8ca07a3d18f39b1669927ef536e485787e856df6"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/c83213b6649d22656b3a4e92544ceeea8a2c6c07"
},
{
"type": "WEB",
"url": "https://git.kernel.org/stable/c/dd6b0ca6025f64ccb465a6a3460c5b0307ed9c44"
},
{
"type": "WEB",
"url": "https://lists.debian.org/debian-lts-announce/2025/03/msg00001.html"
},
{
"type": "WEB",
"url": "https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
]
}
Mitigation MIT-56
For any pointers that could have been modified or provided from a function that can return NULL, check the pointer for NULL before use. When working with a multithreaded or otherwise asynchronous environment, ensure that proper locking APIs are used to lock before the check, and unlock when it has finished [REF-1484].
Mitigation
Select a programming language that is not susceptible to these issues.
Mitigation
Check the results of all functions that return a value and verify that the value is non-null before acting upon it.
Mitigation
Identify all variables and data stores that receive information from external sources, and apply input validation to make sure that they are only initialized to expected values.
Mitigation
Explicitly initialize all variables and other data stores, either during declaration or just before the first usage.
No CAPEC attack patterns related to this CWE.