blk-iolatency: Fix inflight count imbalances and IO hangs on offline
Key facts
- Attack vector
- Local
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- None · None · High
- Fix status
- Partial Red Hat: 3 fixed, 2 without a fix
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and Red Hat.
Summary
In the Linux kernel, the following vulnerability has been resolved: blk-iolatency: Fix inflight count imbalances and IO hangs on offline iolatency needs to track the number of inflight IOs per cgroup. As this tracking can be expensive, it is disabled when no cgroup has iolatency configured for the device. To ensure that the inflight counters stay balanced, iolatency_set_limit() freezes the request_queue while manipulating the enabled counter, which ensures that no IO is in flight and thus all counters are zero. Unfortunately, iolatency_set_limit() isn't the only place where the enabled counter is manipulated. iolatency_pd_offline() can also dec the counter and trigger disabling. As this disabling happens without freezing the q, this can easily happen while some IOs are in flight and thus leak the counts. This can be easily demonstrated by turning on iolatency on an one empty cgroup while IOs are in flight in other cgroups and then removing the cgroup. Note that iolatency shouldn't have been enabled elsewhere in the system to ensure that removing the cgroup disables iolatency for the whole device. The following keeps flipping on and off iolatency on sda: echo +io > /sys/fs/cgroup/cgroup.subtree_control while true; do mkdir -p /sys/fs/cgroup/test echo '8:0 target=100000' > /sys/fs/cgroup/test/io.latency sleep 1 rmdir /sys/fs/cgroup/test sleep 1 done and there's concurrent fio generating direct rand reads: fio --name test --filename=/dev/sda --direct=1 --rw=randread \ --runtime=600 --time_based --iodepth=256 --numjobs=4 --bs=4k while monitoring with the following drgn script: while True: for css in css_for_each_descendant_pre(prog['blkcg_root'].css.address_of_()): for pos in hlist_for_each(container_of(css, 'struct blkcg', 'css').blkg_list): blkg = container_of(pos, 'struct blkcg_gq', 'blkcg_node') pd = blkg.pd[prog['blkcg_policy_iolatency'].plid] if pd.value_() == 0: continue iolat = container_of(pd, 'struct iolatency_grp', 'pd') inflight = iolat.rq_wait.inflight.counter.value_() if inflight: print(f'inflight={inflight} {disk_name(blkg.q.disk).decode("utf-8")} ' f'{cgroup_path(css.cgroup).decode("utf-8")}') time.sleep(1) The monitoring output looks like the following: inflight=1 sda /user.slice inflight=1 sda /user.slice ... inflight=14 sda /user.slice inflight=13 sda /user.slice inflight=17 sda /user.slice inflight=15 sda /user.slice inflight=18 sda /user.slice inflight=17 sda /user.slice inflight=20 sda /user.slice inflight=19 sda /user.slice <- fio stopped, inflight stuck at 19 inflight=19 sda /user.slice inflight=19 sda /user.slice If a cgroup with stuck inflight ends up getting throttled, the throttled IOs will never get issued as there's no completion event to wake it up leading to an indefinite hang. This patch fixes the bug by unifying enable handling into a work item which is automatically kicked off from iolatency_set_min_lat_nsec() which is called from both iolatency_set_limit() and iolatency_pd_offline() paths. Punting to a work item is necessary as iolatency_pd_offline() is called under spinlocks while freezing a request_queue requires a sleepable context. This also simplifies the code reducing LOC sans the comments and avoids the unnecessary freezes which were happening whenever a cgroup's latency target is newly set or cleared.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Linux | Linux | 4.19.29 to before 4.19.247; 4.20.16 to before 4.21 | 4.19.247, 4.21 | Patch available | CNA |
| Linux | Linux | 5.0 and later | 4.19.247, 5.4.198, 5.10.121, 5.15.46, 5.17.14, 5.18.3, 5.19 | Patch available | CNA |
- Linux VendorLinux Affected 4.19.29 to before 4.19.247; 4.20.16 to before 4.21 Fixed in 4.19.247, 4.21 Patch available CNA
- Linux VendorLinux Affected 5.0 and later Fixed in 4.19.247, 5.4.198, 5.10.121, 5.15.46, 5.17.14, 5.18.3, 5.19 Patch available CNA
CPE configurations NVD · 5
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 4.19.29 to before 4.19.247; 4.20.16 to before 5.0; 5.0.1 to before 5.4.198; 5.5 to before 5.10.121; 5.11 to before 5.15.46; 5.16 to before 5.17.14; 5.18 to before 5.18.3 | Vulnerable | Linux |
| cpe:2.3:o:linux:linux_kernel:5.0:-:*:*:*:*:*:* | 5.0 | Vulnerable | Linux |
| cpe:2.3:o:linux:linux_kernel:5.0:rc6:*:*:*:*:*:* | 5.0 rc6 | Vulnerable | Linux |
| cpe:2.3:o:linux:linux_kernel:5.0:rc7:*:*:*:*:*:* | 5.0 rc7 | Vulnerable | Linux |
| cpe:2.3:o:linux:linux_kernel:5.0:rc8:*:*:*:*:*:* | 5.0 rc8 | Vulnerable | Linux |
- cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* Versions 4.19.29 to before 4.19.247; 4.20.16 to before 5.0; 5.0.1 to before 5.4.198; 5.5 to before 5.10.121; 5.11 to before 5.15.46; 5.16 to before 5.17.14; 5.18 to before 5.18.3 Vulnerable ·Linux
- cpe:2.3:o:linux:linux_kernel:5.0:-:*:*:*:*:*:* Versions 5.0 Vulnerable ·Linux
- cpe:2.3:o:linux:linux_kernel:5.0:rc6:*:*:*:*:*:* Versions 5.0 rc6 Vulnerable ·Linux
- cpe:2.3:o:linux:linux_kernel:5.0:rc7:*:*:*:*:*:* Versions 5.0 rc7 Vulnerable ·Linux
- cpe:2.3:o:linux:linux_kernel:5.0:rc8:*:*:*:*:*:* Versions 5.0 rc8 Vulnerable ·Linux
Remediation
- Fix · CNA Linux (Linux) Fixed in 4.19.247, 4.21
- Fix · CNA Linux (Linux) Fixed in 4.19.247, 5.4.198, 5.10.121, 5.15.46, 5.17.14, 5.18.3, 5.19
Red Hat 1 advisory
- RHSA-2022:8267 Released 2022-11-15 · Red Hat rating Moderatekernel security, bug fix, and enhancement update
- Red Hat CodeReady Linux Builder (v. 9) kernel-tools-libs-devel-5.14.0-162.6.1.el9_1
- Red Hat Enterprise Linux AppStream (v. 9) kernel-debug-devel-5.14.0-162.6.1.el9_1, kernel-debug-devel-matched-5.14.0-162.6.1.el9_1, kernel-devel-5.14.0-162.6.1.el9_1 +5
- Red Hat Enterprise Linux BaseOS (v. 9) bpftool-5.14.0-162.6.1.el9_1, kernel-5.14.0-162.6.1.el9_1, kernel-abi-stablelists-5.14.0-162.6.1.el9_1 +14
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Enterprise Linux 8 | Affected | No fix planned: Out of support scope |
| Red Hat Enterprise Linux 9 | Affected | No fix yet |
| Red Hat CodeReady Linux Builder (v. 9) | Fixed | RHSA-2022:8267 |
| Red Hat Enterprise Linux AppStream (v. 9) | Fixed | RHSA-2022:8267 |
| Red Hat Enterprise Linux BaseOS (v. 9) | Fixed | RHSA-2022:8267 |
Not affected: 3 products
- Red Hat Enterprise Linux 10
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
Timeline
- 2026-10-02 Threatist record created from CVE-2022-49394
- 2026-10-03 Alias added: GHSA-896c-jr9v-xc8g
References
Patch 7
- https://git.kernel.org/stable/c/515d077ee3085ae343b6bea7fd031f9906645f38
- https://git.kernel.org/stable/c/d19fa8f252000d141f9199ca32959c50314e1f05
- https://git.kernel.org/stable/c/77692c02e1517c54f2fd0535f41aa4286ac9f140
- https://git.kernel.org/stable/c/a30acbb5dfb7bcc813ad6a18ca31011ac44e5547
- https://git.kernel.org/stable/c/968f7a239c590454ffba79c126fbe0e963a0ba78
- https://git.kernel.org/stable/c/5b0ff3ebbef791341695b718f8d2870869cf1d01
- https://git.kernel.org/stable/c/8a177a36da6c54c98b8685d4f914cb3637d53c0d
More Linux Kernel vulnerabilities
- TI-2025-26358 tls: fix handling of zero-length records on the rx_list KEVCVSS 3.1CRITICAL 9.8
- TI-2026-38352 netfilter: bridge: make ebt_snat ARP rewrite writable KEVCVSS 3.1HIGH 8.8
- TI-2013-05264 The (1) get_user and (2) put_user API functions in the Linux kernel before 3.5.5 on the… KEVCVSS 3.1HIGH 8.8
- TI-2022-00125 Integer overflow in kernel KEVCVSS 3.1HIGH 8.4
- TI-2013-01864 The perf_swevent_init function in kernel/events/core.c in the Linux kernel before 3.8.9… KEVCVSS 3.1HIGH 8.4
- TI-2021-05514 Heap Out-Of-Bounds Write in Netfilter IP6T_SO_SET_REPLACE KEVCVSS 3.1HIGH 8.3
Sources
- CVE-2022-49394 · CVE Program
- CVE-2022-49394 · NVD
- FIRST EPSS
- GHSA-896c-jr9v-xc8g · GitHub Advisory Database · CC BY 4.0
- CVE-2022-49394 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences