# CVE-2021-47598: sch\_cake: do not call cake\_destroy() from cake\_init()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.32% (percentile 17, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2024-06-19T14:53:59.549Z
- **Modified:** 2026-08-05T08:48:31.780Z

## Who should check

- Anyone running Linux \>= 046f6fd5daefac7f5abdafb436b30f63bc7c602b, \< 4e388232e630ebe4f94b4a0715ec98c0e2b314a3; \>= 046f6fd5daefac7f5abdafb436b30f63bc7c602b, \< 0d80462fbdcafd536dcad7569e65d3d14a7e9f2f; \>= 046f6fd5daefac7f5abdafb436b30f63bc7c602b, \< 20ad1ef02f9ad5e1dda9eeb113e4c158b4806986; \>= 046f6fd5daefac7f5abdafb436b30f63bc7c602b, \< f6deae2e2d83bd267e1986f5d71d8c458e18fd99; \>= 046f6fd5daefac7f5abdafb436b30f63bc7c602b, \< ab443c53916730862cec202078d36fd4008bea79
- Anyone running Linux 4.19

## Description

In the Linux kernel, the following vulnerability has been resolved:

sch\_cake: do not call cake\_destroy() from cake\_init()

qdiscs are not supposed to call their own destroy() method
from init(), because core stack already does that.

syzbot was able to trigger use after free:

DEBUG\_LOCKS\_WARN\_ON(lock-\>magic != lock)
WARNING: CPU: 0 PID: 21902 at kernel/locking/mutex.c:586 \_\_mutex\_lock\_common kernel/locking/mutex.c:586 \[inline\]
WARNING: CPU: 0 PID: 21902 at kernel/locking/mutex.c:586 \_\_mutex\_lock+0x9ec/0x12f0 kernel/locking/mutex.c:740
Modules linked in:
CPU: 0 PID: 21902 Comm: syz-executor189 Not tainted 5.16.0-rc4-syzkaller \#0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:\_\_mutex\_lock\_common kernel/locking/mutex.c:586 \[inline\]
RIP: 0010:\_\_mutex\_lock+0x9ec/0x12f0 kernel/locking/mutex.c:740
Code: 08 84 d2 0f 85 19 08 00 00 8b 05 97 38 4b 04 85 c0 0f 85 27 f7 ff ff 48 c7 c6 20 00 ac 89 48 c7 c7 a0 fe ab 89 e8 bf 76 ba ff \<0f\> 0b e9 0d f7 ff ff 48 8b 44 24 40 48 8d b8 c8 08 00 00 48 89 f8
RSP: 0018:ffffc9000627f290 EFLAGS: 00010282
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: ffff88802315d700 RSI: ffffffff815f1db8 RDI: fffff52000c4fe44
RBP: ffff88818f28e000 R08: 0000000000000000 R09: 0000000000000000
R10: ffffffff815ebb5e R11: 0000000000000000 R12: 0000000000000000
R13: dffffc0000000000 R14: ffffc9000627f458 R15: 0000000093c30000
FS:  0000555556abc400(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fda689c3303 CR3: 000000001cfbb000 CR4: 0000000000350ef0
Call Trace:
 \<TASK\>
 tcf\_chain0\_head\_change\_cb\_del+0x2e/0x3d0 net/sched/cls\_api.c:810
 tcf\_block\_put\_ext net/sched/cls\_api.c:1381 \[inline\]
 tcf\_block\_put\_ext net/sched/cls\_api.c:1376 \[inline\]
 tcf\_block\_put+0xbc/0x130 net/sched/cls\_api.c:1394
 cake\_destroy+0x3f/0x80 net/sched/sch\_cake.c:2695
 qdisc\_create.constprop.0+0x9da/0x10f0 net/sched/sch\_api.c:1293
 tc\_modify\_qdisc+0x4c5/0x1980 net/sched/sch\_api.c:1660
 rtnetlink\_rcv\_msg+0x413/0xb80 net/core/rtnetlink.c:5571
 netlink\_rcv\_skb+0x153/0x420 net/netlink/af\_netlink.c:2496
 netlink\_unicast\_kernel net/netlink/af\_netlink.c:1319 \[inline\]
 netlink\_unicast+0x533/0x7d0 net/netlink/af\_netlink.c:1345
 netlink\_sendmsg+0x904/0xdf0 net/netlink/af\_netlink.c:1921
 sock\_sendmsg\_nosec net/socket.c:704 \[inline\]
 sock\_sendmsg+0xcf/0x120 net/socket.c:724
 \_\_\_\_sys\_sendmsg+0x6e8/0x810 net/socket.c:2409
 \_\_\_sys\_sendmsg+0xf3/0x170 net/socket.c:2463
 \_\_sys\_sendmsg+0xe5/0x1b0 net/socket.c:2492
 do\_syscall\_x64 arch/x86/entry/common.c:50 \[inline\]
 do\_syscall\_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry\_SYSCALL\_64\_after\_hwframe+0x44/0xae
RIP: 0033:0x7f1bb06badb9
Code: Unable to access opcode bytes at RIP 0x7f1bb06bad8f.
RSP: 002b:00007fff3012a658 EFLAGS: 00000246 ORIG\_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f1bb06badb9
RDX: 0000000000000000 RSI: 00000000200007c0 RDI: 0000000000000003
RBP: 0000000000000000 R08: 0000000000000003 R09: 0000000000000003
R10: 0000000000000003 R11: 0000000000000246 R12: 00007fff3012a688
R13: 00007fff3012a6a0 R14: 00007fff3012a6e0 R15: 00000000000013c2
 \</TASK\>

## Affected and fixed versions

- Linux: \>= 046f6fd5daefac7f5abdafb436b30f63bc7c602b, \< 4e388232e630ebe4f94b4a0715ec98c0e2b314a3; \>= 046f6fd5daefac7f5abdafb436b30f63bc7c602b, \< 0d80462fbdcafd536dcad7569e65d3d14a7e9f2f; \>= 046f6fd5daefac7f5abdafb436b30f63bc7c602b, \< 20ad1ef02f9ad5e1dda9eeb113e4c158b4806986; \>= 046f6fd5daefac7f5abdafb436b30f63bc7c602b, \< f6deae2e2d83bd267e1986f5d71d8c458e18fd99; \>= 046f6fd5daefac7f5abdafb436b30f63bc7c602b, \< ab443c53916730862cec202078d36fd4008bea79 (cvelist)
- Linux: 4.19 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2021-47598. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2021-47598.md
Affected: Linux >= 046f6fd5daefac7f5abdafb436b30f63bc7c602b, < 4e388232e630ebe4f94b4a0715ec98c0e2b314a3; >= 046f6fd5daefac7f5abdafb436b30f63bc7c602b, < 0d80462fbdcafd536dcad7569e65d3d14a7e9f2f; >= 046f6fd5daefac7f5abdafb436b30f63bc7c602b, < 20ad1ef02f9ad5e1dda9eeb113e4c158b4806986; >= 046f6fd5daefac7f5abdafb…
Fixed in: Linux 4e388232e630ebe4f94b4a0715ec98c0e2b314a3, Linux 0d80462fbdcafd536dcad7569e65d3d14a7e9f2f, Linux 20ad1ef02f9ad5e1dda9eeb113e4c158b4806986

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2021-47598 being exploited?

There is no confirmed exploitation: CVE-2021-47598 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.32% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2021-47598?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2021-47598?

Linux \>= 046f6fd5daefac7f5abdafb436b30f63bc7c602b, \< 4e388232e630ebe4f94b4a0715ec98c0e2b314a3; \>= 046f6fd5daefac7f5abdafb436b30f63bc7c602b, \< 0d80462fbdcafd536dcad7569e65d3d14a7e9f2f; \>= 046f6fd5daefac7f5abdafb436b30f63bc7c602b, \< 20ad1ef02f9ad5e1dda9eeb113e4c158b4806986; \>= 046f6fd5daefac7f5abdafb436b30f63bc7c602b, \< f6deae2e2d83bd267e1986f5d71d8c458e18fd99; \>= 046f6fd5daefac7f5abdafb436b30f63bc7c602b, \< ab443c53916730862cec202078d36fd4008bea79; Linux 4.19.

### Is there a fix for CVE-2021-47598?

Yes. Fixed in Linux 4e388232e630ebe4f94b4a0715ec98c0e2b314a3, Linux 0d80462fbdcafd536dcad7569e65d3d14a7e9f2f, Linux 20ad1ef02f9ad5e1dda9eeb113e4c158b4806986. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2021-47598?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/4e388232e630ebe4f94b4a0715ec98c0e2b314a3>
- patch: <https://git.kernel.org/stable/c/0d80462fbdcafd536dcad7569e65d3d14a7e9f2f>
- patch: <https://git.kernel.org/stable/c/20ad1ef02f9ad5e1dda9eeb113e4c158b4806986>
- patch: <https://git.kernel.org/stable/c/f6deae2e2d83bd267e1986f5d71d8c458e18fd99>
- patch: <https://git.kernel.org/stable/c/ab443c53916730862cec202078d36fd4008bea79>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2021-47598>

HTML: <https://flawdb.com/CVE-2021-47598> · JSON: <https://flawdb.com/api/v1/entries/CVE-2021-47598>
