CVE-2020-36789 (GCVE-0-2020-36789)
Vulnerability from cvelistv5 – Published: 2025-04-17 18:01 – Updated: 2025-10-01 17:02
VLAI?
Title
can: dev: can_get_echo_skb(): prevent call to kfree_skb() in hard IRQ context
Summary
In the Linux kernel, the following vulnerability has been resolved:
can: dev: can_get_echo_skb(): prevent call to kfree_skb() in hard IRQ context
If a driver calls can_get_echo_skb() during a hardware IRQ (which is often, but
not always, the case), the 'WARN_ON(in_irq)' in
net/core/skbuff.c#skb_release_head_state() might be triggered, under network
congestion circumstances, together with the potential risk of a NULL pointer
dereference.
The root cause of this issue is the call to kfree_skb() instead of
dev_kfree_skb_irq() in net/core/dev.c#enqueue_to_backlog().
This patch prevents the skb to be freed within the call to netif_rx() by
incrementing its reference count with skb_get(). The skb is finally freed by
one of the in-irq-context safe functions: dev_consume_skb_any() or
dev_kfree_skb_any(). The "any" version is used because some drivers might call
can_get_echo_skb() in a normal context.
The reason for this issue to occur is that initially, in the core network
stack, loopback skb were not supposed to be received in hardware IRQ context.
The CAN stack is an exeption.
This bug was previously reported back in 2017 in [1] but the proposed patch
never got accepted.
While [1] directly modifies net/core/dev.c, we try to propose here a
smoother modification local to CAN network stack (the assumption
behind is that only CAN devices are affected by this issue).
[1] http://lore.kernel.org/r/57a3ffb6-3309-3ad5-5a34-e93c3fe3614d@cetitec.com
Severity ?
5.5 (Medium)
CWE
- CWE-476 - NULL Pointer Dereference
Assigner
References
Impacted products
| Vendor | Product | Version | |||||||
|---|---|---|---|---|---|---|---|---|---|
| Linux | Linux |
Affected:
39549eef3587f1c1e8c65c88a2400d10fd30ea17 , < 248b71ce92d4f3a574b2537f9838f48e892618f4
(git)
Affected: 39549eef3587f1c1e8c65c88a2400d10fd30ea17 , < 451187b20431924d13fcfecc500d7cd2d9951bac (git) Affected: 39549eef3587f1c1e8c65c88a2400d10fd30ea17 , < 3a922a85701939624484e7f2fd07d32beed00d25 (git) Affected: 39549eef3587f1c1e8c65c88a2400d10fd30ea17 , < 7e4cf2ec0ca236c3e5f904239cec6efe1f3baf22 (git) Affected: 39549eef3587f1c1e8c65c88a2400d10fd30ea17 , < ab46748bf98864f9c3f5559060bf8caf9df2b41e (git) Affected: 39549eef3587f1c1e8c65c88a2400d10fd30ea17 , < 87530b557affe01c764de32dbeb58cdf47234574 (git) Affected: 39549eef3587f1c1e8c65c88a2400d10fd30ea17 , < 2283f79b22684d2812e5c76fc2280aae00390365 (git) |
|||||||
|
|||||||||
{
"containers": {
"adp": [
{
"metrics": [
{
"cvssV3_1": {
"attackComplexity": "LOW",
"attackVector": "LOCAL",
"availabilityImpact": "HIGH",
"baseScore": 5.5,
"baseSeverity": "MEDIUM",
"confidentialityImpact": "NONE",
"integrityImpact": "NONE",
"privilegesRequired": "LOW",
"scope": "UNCHANGED",
"userInteraction": "NONE",
"vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
"version": "3.1"
}
},
{
"other": {
"content": {
"id": "CVE-2020-36789",
"options": [
{
"Exploitation": "none"
},
{
"Automatable": "no"
},
{
"Technical Impact": "partial"
}
],
"role": "CISA Coordinator",
"timestamp": "2025-10-01T17:02:36.182162Z",
"version": "2.0.3"
},
"type": "ssvc"
}
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-476",
"description": "CWE-476 NULL Pointer Dereference",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2025-10-01T17:02:39.312Z",
"orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"shortName": "CISA-ADP"
},
"title": "CISA ADP Vulnrichment"
}
],
"cna": {
"affected": [
{
"defaultStatus": "unaffected",
"product": "Linux",
"programFiles": [
"drivers/net/can/dev.c"
],
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"versions": [
{
"lessThan": "248b71ce92d4f3a574b2537f9838f48e892618f4",
"status": "affected",
"version": "39549eef3587f1c1e8c65c88a2400d10fd30ea17",
"versionType": "git"
},
{
"lessThan": "451187b20431924d13fcfecc500d7cd2d9951bac",
"status": "affected",
"version": "39549eef3587f1c1e8c65c88a2400d10fd30ea17",
"versionType": "git"
},
{
"lessThan": "3a922a85701939624484e7f2fd07d32beed00d25",
"status": "affected",
"version": "39549eef3587f1c1e8c65c88a2400d10fd30ea17",
"versionType": "git"
},
{
"lessThan": "7e4cf2ec0ca236c3e5f904239cec6efe1f3baf22",
"status": "affected",
"version": "39549eef3587f1c1e8c65c88a2400d10fd30ea17",
"versionType": "git"
},
{
"lessThan": "ab46748bf98864f9c3f5559060bf8caf9df2b41e",
"status": "affected",
"version": "39549eef3587f1c1e8c65c88a2400d10fd30ea17",
"versionType": "git"
},
{
"lessThan": "87530b557affe01c764de32dbeb58cdf47234574",
"status": "affected",
"version": "39549eef3587f1c1e8c65c88a2400d10fd30ea17",
"versionType": "git"
},
{
"lessThan": "2283f79b22684d2812e5c76fc2280aae00390365",
"status": "affected",
"version": "39549eef3587f1c1e8c65c88a2400d10fd30ea17",
"versionType": "git"
}
]
},
{
"defaultStatus": "affected",
"product": "Linux",
"programFiles": [
"drivers/net/can/dev.c"
],
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"versions": [
{
"status": "affected",
"version": "2.6.31"
},
{
"lessThan": "2.6.31",
"status": "unaffected",
"version": "0",
"versionType": "semver"
},
{
"lessThanOrEqual": "4.4.*",
"status": "unaffected",
"version": "4.4.244",
"versionType": "semver"
},
{
"lessThanOrEqual": "4.9.*",
"status": "unaffected",
"version": "4.9.244",
"versionType": "semver"
},
{
"lessThanOrEqual": "4.14.*",
"status": "unaffected",
"version": "4.14.207",
"versionType": "semver"
},
{
"lessThanOrEqual": "4.19.*",
"status": "unaffected",
"version": "4.19.158",
"versionType": "semver"
},
{
"lessThanOrEqual": "5.4.*",
"status": "unaffected",
"version": "5.4.78",
"versionType": "semver"
},
{
"lessThanOrEqual": "5.9.*",
"status": "unaffected",
"version": "5.9.9",
"versionType": "semver"
},
{
"lessThanOrEqual": "*",
"status": "unaffected",
"version": "5.10",
"versionType": "original_commit_for_fix"
}
]
}
],
"cpeApplicability": [
{
"nodes": [
{
"cpeMatch": [
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "4.4.244",
"versionStartIncluding": "2.6.31",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "4.9.244",
"versionStartIncluding": "2.6.31",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "4.14.207",
"versionStartIncluding": "2.6.31",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "4.19.158",
"versionStartIncluding": "2.6.31",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "5.4.78",
"versionStartIncluding": "2.6.31",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "5.9.9",
"versionStartIncluding": "2.6.31",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "5.10",
"versionStartIncluding": "2.6.31",
"vulnerable": true
}
],
"negate": false,
"operator": "OR"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "In the Linux kernel, the following vulnerability has been resolved:\n\ncan: dev: can_get_echo_skb(): prevent call to kfree_skb() in hard IRQ context\n\nIf a driver calls can_get_echo_skb() during a hardware IRQ (which is often, but\nnot always, the case), the \u0027WARN_ON(in_irq)\u0027 in\nnet/core/skbuff.c#skb_release_head_state() might be triggered, under network\ncongestion circumstances, together with the potential risk of a NULL pointer\ndereference.\n\nThe root cause of this issue is the call to kfree_skb() instead of\ndev_kfree_skb_irq() in net/core/dev.c#enqueue_to_backlog().\n\nThis patch prevents the skb to be freed within the call to netif_rx() by\nincrementing its reference count with skb_get(). The skb is finally freed by\none of the in-irq-context safe functions: dev_consume_skb_any() or\ndev_kfree_skb_any(). The \"any\" version is used because some drivers might call\ncan_get_echo_skb() in a normal context.\n\nThe reason for this issue to occur is that initially, in the core network\nstack, loopback skb were not supposed to be received in hardware IRQ context.\nThe CAN stack is an exeption.\n\nThis bug was previously reported back in 2017 in [1] but the proposed patch\nnever got accepted.\n\nWhile [1] directly modifies net/core/dev.c, we try to propose here a\nsmoother modification local to CAN network stack (the assumption\nbehind is that only CAN devices are affected by this issue).\n\n[1] http://lore.kernel.org/r/57a3ffb6-3309-3ad5-5a34-e93c3fe3614d@cetitec.com"
}
],
"providerMetadata": {
"dateUpdated": "2025-05-04T06:59:03.836Z",
"orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"shortName": "Linux"
},
"references": [
{
"url": "https://git.kernel.org/stable/c/248b71ce92d4f3a574b2537f9838f48e892618f4"
},
{
"url": "https://git.kernel.org/stable/c/451187b20431924d13fcfecc500d7cd2d9951bac"
},
{
"url": "https://git.kernel.org/stable/c/3a922a85701939624484e7f2fd07d32beed00d25"
},
{
"url": "https://git.kernel.org/stable/c/7e4cf2ec0ca236c3e5f904239cec6efe1f3baf22"
},
{
"url": "https://git.kernel.org/stable/c/ab46748bf98864f9c3f5559060bf8caf9df2b41e"
},
{
"url": "https://git.kernel.org/stable/c/87530b557affe01c764de32dbeb58cdf47234574"
},
{
"url": "https://git.kernel.org/stable/c/2283f79b22684d2812e5c76fc2280aae00390365"
}
],
"title": "can: dev: can_get_echo_skb(): prevent call to kfree_skb() in hard IRQ context",
"x_generator": {
"engine": "bippy-1.2.0"
}
}
},
"cveMetadata": {
"assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"assignerShortName": "Linux",
"cveId": "CVE-2020-36789",
"datePublished": "2025-04-17T18:01:28.613Z",
"dateReserved": "2024-02-26T17:07:27.435Z",
"dateUpdated": "2025-10-01T17:02:39.312Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.1",
"vulnerability-lookup:meta": {
"vulnrichment": {
"containers": "{\"adp\": [{\"title\": \"CISA ADP Vulnrichment\", \"metrics\": [{\"cvssV3_1\": {\"scope\": \"UNCHANGED\", \"version\": \"3.1\", \"baseScore\": 5.5, \"attackVector\": \"LOCAL\", \"baseSeverity\": \"MEDIUM\", \"vectorString\": \"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H\", \"integrityImpact\": \"NONE\", \"userInteraction\": \"NONE\", \"attackComplexity\": \"LOW\", \"availabilityImpact\": \"HIGH\", \"privilegesRequired\": \"LOW\", \"confidentialityImpact\": \"NONE\"}}, {\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2020-36789\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"partial\"}], \"version\": \"2.0.3\", \"timestamp\": \"2025-10-01T17:02:36.182162Z\"}}}], \"problemTypes\": [{\"descriptions\": [{\"lang\": \"en\", \"type\": \"CWE\", \"cweId\": \"CWE-476\", \"description\": \"CWE-476 NULL Pointer Dereference\"}]}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2025-10-01T14:41:34.782Z\"}}], \"cna\": {\"title\": \"can: dev: can_get_echo_skb(): prevent call to kfree_skb() in hard IRQ context\", \"affected\": [{\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"39549eef3587f1c1e8c65c88a2400d10fd30ea17\", \"lessThan\": \"248b71ce92d4f3a574b2537f9838f48e892618f4\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"39549eef3587f1c1e8c65c88a2400d10fd30ea17\", \"lessThan\": \"451187b20431924d13fcfecc500d7cd2d9951bac\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"39549eef3587f1c1e8c65c88a2400d10fd30ea17\", \"lessThan\": \"3a922a85701939624484e7f2fd07d32beed00d25\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"39549eef3587f1c1e8c65c88a2400d10fd30ea17\", \"lessThan\": \"7e4cf2ec0ca236c3e5f904239cec6efe1f3baf22\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"39549eef3587f1c1e8c65c88a2400d10fd30ea17\", \"lessThan\": \"ab46748bf98864f9c3f5559060bf8caf9df2b41e\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"39549eef3587f1c1e8c65c88a2400d10fd30ea17\", \"lessThan\": \"87530b557affe01c764de32dbeb58cdf47234574\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"39549eef3587f1c1e8c65c88a2400d10fd30ea17\", \"lessThan\": \"2283f79b22684d2812e5c76fc2280aae00390365\", \"versionType\": \"git\"}], \"programFiles\": [\"drivers/net/can/dev.c\"], \"defaultStatus\": \"unaffected\"}, {\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"2.6.31\"}, {\"status\": \"unaffected\", \"version\": \"0\", \"lessThan\": \"2.6.31\", \"versionType\": \"semver\"}, {\"status\": \"unaffected\", \"version\": \"4.4.244\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"4.4.*\"}, {\"status\": \"unaffected\", \"version\": \"4.9.244\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"4.9.*\"}, {\"status\": \"unaffected\", \"version\": \"4.14.207\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"4.14.*\"}, {\"status\": \"unaffected\", \"version\": \"4.19.158\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"4.19.*\"}, {\"status\": \"unaffected\", \"version\": \"5.4.78\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"5.4.*\"}, {\"status\": \"unaffected\", \"version\": \"5.9.9\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"5.9.*\"}, {\"status\": \"unaffected\", \"version\": \"5.10\", \"versionType\": \"original_commit_for_fix\", \"lessThanOrEqual\": \"*\"}], \"programFiles\": [\"drivers/net/can/dev.c\"], \"defaultStatus\": \"affected\"}], \"references\": [{\"url\": \"https://git.kernel.org/stable/c/248b71ce92d4f3a574b2537f9838f48e892618f4\"}, {\"url\": \"https://git.kernel.org/stable/c/451187b20431924d13fcfecc500d7cd2d9951bac\"}, {\"url\": \"https://git.kernel.org/stable/c/3a922a85701939624484e7f2fd07d32beed00d25\"}, {\"url\": \"https://git.kernel.org/stable/c/7e4cf2ec0ca236c3e5f904239cec6efe1f3baf22\"}, {\"url\": \"https://git.kernel.org/stable/c/ab46748bf98864f9c3f5559060bf8caf9df2b41e\"}, {\"url\": \"https://git.kernel.org/stable/c/87530b557affe01c764de32dbeb58cdf47234574\"}, {\"url\": \"https://git.kernel.org/stable/c/2283f79b22684d2812e5c76fc2280aae00390365\"}], \"x_generator\": {\"engine\": \"bippy-1.2.0\"}, \"descriptions\": [{\"lang\": \"en\", \"value\": \"In the Linux kernel, the following vulnerability has been resolved:\\n\\ncan: dev: can_get_echo_skb(): prevent call to kfree_skb() in hard IRQ context\\n\\nIf a driver calls can_get_echo_skb() during a hardware IRQ (which is often, but\\nnot always, the case), the \u0027WARN_ON(in_irq)\u0027 in\\nnet/core/skbuff.c#skb_release_head_state() might be triggered, under network\\ncongestion circumstances, together with the potential risk of a NULL pointer\\ndereference.\\n\\nThe root cause of this issue is the call to kfree_skb() instead of\\ndev_kfree_skb_irq() in net/core/dev.c#enqueue_to_backlog().\\n\\nThis patch prevents the skb to be freed within the call to netif_rx() by\\nincrementing its reference count with skb_get(). The skb is finally freed by\\none of the in-irq-context safe functions: dev_consume_skb_any() or\\ndev_kfree_skb_any(). The \\\"any\\\" version is used because some drivers might call\\ncan_get_echo_skb() in a normal context.\\n\\nThe reason for this issue to occur is that initially, in the core network\\nstack, loopback skb were not supposed to be received in hardware IRQ context.\\nThe CAN stack is an exeption.\\n\\nThis bug was previously reported back in 2017 in [1] but the proposed patch\\nnever got accepted.\\n\\nWhile [1] directly modifies net/core/dev.c, we try to propose here a\\nsmoother modification local to CAN network stack (the assumption\\nbehind is that only CAN devices are affected by this issue).\\n\\n[1] http://lore.kernel.org/r/57a3ffb6-3309-3ad5-5a34-e93c3fe3614d@cetitec.com\"}], \"cpeApplicability\": [{\"nodes\": [{\"negate\": false, \"cpeMatch\": [{\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"4.4.244\", \"versionStartIncluding\": \"2.6.31\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"4.9.244\", \"versionStartIncluding\": \"2.6.31\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"4.14.207\", \"versionStartIncluding\": \"2.6.31\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"4.19.158\", \"versionStartIncluding\": \"2.6.31\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"5.4.78\", \"versionStartIncluding\": \"2.6.31\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"5.9.9\", \"versionStartIncluding\": \"2.6.31\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"5.10\", \"versionStartIncluding\": \"2.6.31\"}], \"operator\": \"OR\"}]}], \"providerMetadata\": {\"orgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"shortName\": \"Linux\", \"dateUpdated\": \"2025-05-04T06:59:03.836Z\"}}}",
"cveMetadata": "{\"cveId\": \"CVE-2020-36789\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2025-10-01T17:02:39.312Z\", \"dateReserved\": \"2024-02-26T17:07:27.435Z\", \"assignerOrgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"datePublished\": \"2025-04-17T18:01:28.613Z\", \"assignerShortName\": \"Linux\"}",
"dataType": "CVE_RECORD",
"dataVersion": "5.1"
}
}
}
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…
Loading…