CVE-2021-46984
Linux Kernel vulnerability analysis and mitigation

Overview

CVE-2021-46984 affects the Linux kernel's Kyber I/O scheduler. The vulnerability was discovered in the biomerge functionality where an out-of-bounds access could occur when a thread is preempted between two calls to blkmqgetctx(). The issue affects Linux kernel versions from 4.18 up to 5.13.rc1 (NVD).

Technical details

The vulnerability occurs in the _blkmqschedbiomerge() function which gets the ctx and hctx for the current CPU and passes the hctx to ->biomerge(). When kyberbiomerge() then gets the ctx for the current CPU again, the thread may be preempted between the two calls to blkmqgetctx(), causing the ctx returned the second time to potentially no longer correspond to the passed hctx. This can lead to reading garbage if the second ctx comes from an hctx with more ctx's than the first one (if ctx->indexhw[hctx->type] > hctx->nr_ctx) (Kernel Patch).

Impact

The vulnerability can result in an out-of-bounds array access, which manifests as a UBSAN (Undefined Behavior Sanitizer) array-index-out-of-bounds error. This could potentially lead to system instability or crashes (NVD).

Mitigation and workarounds

The vulnerability was fixed by modifying the biomerge interface to pass the requestqueue instead of the hardware context (hctx). The fix involves changes to multiple files including block/bfq-iosched.c, block/blk-mq-sched.c, block/kyber-iosched.c, block/mq-deadline.c, and include/linux/elevator.h (Kernel Patch).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management