CVE-2020-36791 net_sched: keep alloc_hash updated after hash allocation
An out-of-bounds access in the Linux kernel's net_sched component allows attackers to potentially execute code or cause a denial of service.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2020-36791?
CVE-2020-36791 is a high-severity memory corruption vulnerability in Linux kernel, published on 7 May 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
net_sched: keep alloc_hash updated after hash allocation
In commit 599be01ee567 ("net_sched: fix an OOB access in cls_tcindex") I moved cp->hash calculation before the first tcindex_alloc_perfect_hash(), but cp->alloc_hash is left untouched. This difference could lead to another out of bound access.
cp->alloc_hash should always be the size allocated, we should update it after this tcindex_alloc_perfect_hash().
Weakness: CWE-125
Which versions are affected by CVE-2020-36791?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2020-36791?
Apply the vendor's patch.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2020-36791 being exploited?
There is no known exploitation of CVE-2020-36791 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as DEBIAN-CVE-2020-36791, GHSA-5pxm-fr3g-jf32, UBUNTU-CVE-2020-36791.