# CVE-2023-54242: block, bfq: Fix division by zero error on zero wsum

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

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **EPSS:** 0.26% (percentile 10, 2026-11-26)
- **Published:** 2025-12-30T12:11:30.503Z
- **Modified:** 2026-06-17T06:47:04.723Z

## Who should check

- Anyone running Linux \>= 76f1df88bbc2f984eb0418cc90de0a8384e63604, \< 1655cfc85250a224b0d9486c8136baeea33b9b5c; \>= 76f1df88bbc2f984eb0418cc90de0a8384e63604, \< c0346a59d719461248c6dc6f21c9e55ef836b66f; \>= 76f1df88bbc2f984eb0418cc90de0a8384e63604, \< e53413f8deedf738a6782cc14cc00bd5852ccf18
- Anyone running Linux 5.17

## Description

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

block, bfq: Fix division by zero error on zero wsum

When the weighted sum is zero the calculation of limit causes
a division by zero error. Fix this by continuing to the next level.

This was discovered by running as root:

stress-ng --ioprio 0

Fixes divison by error oops:

\[  521.450556\] divide error: 0000 \[\#1\] SMP NOPTI
\[  521.450766\] CPU: 2 PID: 2684464 Comm: stress-ng-iopri Not tainted 6.2.1-1280.native \#1
\[  521.451117\] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.1-0-g3208b098f51a-prebuilt.qemu.org 04/01/2014
\[  521.451627\] RIP: 0010:bfqq\_request\_over\_limit+0x207/0x400
\[  521.451875\] Code: 01 48 8d 0c c8 74 0b 48 8b 82 98 00 00 00 48 8d 0c c8 8b 85 34 ff ff ff 48 89 ca 41 0f af 41 50 48 d1 ea 48 98 48 01 d0 31 d2 \<48\> f7 f1 41 39 41 48 89 85 34 ff ff ff 0f 8c 7b 01 00 00 49 8b 44
\[  521.452699\] RSP: 0018:ffffb1af84eb3948 EFLAGS: 00010046
\[  521.452938\] RAX: 000000000000003c RBX: 0000000000000000 RCX: 0000000000000000
\[  521.453262\] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffb1af84eb3978
\[  521.453584\] RBP: ffffb1af84eb3a30 R08: 0000000000000001 R09: ffff8f88ab8a4ba0
\[  521.453905\] R10: 0000000000000000 R11: 0000000000000001 R12: ffff8f88ab8a4b18
\[  521.454224\] R13: ffff8f8699093000 R14: 0000000000000001 R15: ffffb1af84eb3970
\[  521.454549\] FS:  00005640b6b0b580(0000) GS:ffff8f88b3880000(0000) knlGS:0000000000000000
\[  521.454912\] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
\[  521.455170\] CR2: 00007ffcbcae4e38 CR3: 00000002e46de001 CR4: 0000000000770ee0
\[  521.455491\] PKRU: 55555554
\[  521.455619\] Call Trace:
\[  521.455736\]  \<TASK\>
\[  521.455837\]  ? bfq\_request\_merge+0x3a/0xc0
\[  521.456027\]  ? elv\_merge+0x115/0x140
\[  521.456191\]  bfq\_limit\_depth+0xc8/0x240
\[  521.456366\]  \_\_blk\_mq\_alloc\_requests+0x21a/0x2c0
\[  521.456577\]  blk\_mq\_submit\_bio+0x23c/0x6c0
\[  521.456766\]  \_\_submit\_bio+0xb8/0x140
\[  521.457236\]  submit\_bio\_noacct\_nocheck+0x212/0x300
\[  521.457748\]  submit\_bio\_noacct+0x1a6/0x580
\[  521.458220\]  submit\_bio+0x43/0x80
\[  521.458660\]  ext4\_io\_submit+0x23/0x80
\[  521.459116\]  ext4\_do\_writepages+0x40a/0xd00
\[  521.459596\]  ext4\_writepages+0x65/0x100
\[  521.460050\]  do\_writepages+0xb7/0x1c0
\[  521.460492\]  \_\_filemap\_fdatawrite\_range+0xa6/0x100
\[  521.460979\]  file\_write\_and\_wait\_range+0xbf/0x140
\[  521.461452\]  ext4\_sync\_file+0x105/0x340
\[  521.461882\]  \_\_x64\_sys\_fsync+0x67/0x100
\[  521.462305\]  ? syscall\_exit\_to\_user\_mode+0x2c/0x1c0
\[  521.462768\]  do\_syscall\_64+0x3b/0xc0
\[  521.463165\]  entry\_SYSCALL\_64\_after\_hwframe+0x5a/0xc4
\[  521.463621\] RIP: 0033:0x5640b6c56590
\[  521.464006\] Code: 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 80 3d 71 70 0e 00 00 74 17 b8 4a 00 00 00 0f 05 \<48\> 3d 00 f0 ff ff 77 48 c3 0f 1f 80 00 00 00 00 48 83 ec 18 89 7c

## Affected and fixed versions

- Linux: \>= 76f1df88bbc2f984eb0418cc90de0a8384e63604, \< 1655cfc85250a224b0d9486c8136baeea33b9b5c; \>= 76f1df88bbc2f984eb0418cc90de0a8384e63604, \< c0346a59d719461248c6dc6f21c9e55ef836b66f; \>= 76f1df88bbc2f984eb0418cc90de0a8384e63604, \< e53413f8deedf738a6782cc14cc00bd5852ccf18 (cvelist)
- Linux: 5.17 (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-2023-54242. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-54242.md
Affected: Linux >= 76f1df88bbc2f984eb0418cc90de0a8384e63604, < 1655cfc85250a224b0d9486c8136baeea33b9b5c; >= 76f1df88bbc2f984eb0418cc90de0a8384e63604, < c0346a59d719461248c6dc6f21c9e55ef836b66f; >= 76f1df88bbc2f984eb0418cc90de0a8384e63604, < e53413f8deedf738a6782cc14cc00bd5852ccf18; Linux 5.17
Fixed in: Linux 1655cfc85250a224b0d9486c8136baeea33b9b5c

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-2023-54242 being exploited?

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

### How serious is CVE-2023-54242?

It has no CVSS score yet. Unknown.

### Which versions are affected by CVE-2023-54242?

Linux \>= 76f1df88bbc2f984eb0418cc90de0a8384e63604, \< 1655cfc85250a224b0d9486c8136baeea33b9b5c; \>= 76f1df88bbc2f984eb0418cc90de0a8384e63604, \< c0346a59d719461248c6dc6f21c9e55ef836b66f; \>= 76f1df88bbc2f984eb0418cc90de0a8384e63604, \< e53413f8deedf738a6782cc14cc00bd5852ccf18; Linux 5.17.

### Is there a fix for CVE-2023-54242?

Yes. Fixed in Linux 1655cfc85250a224b0d9486c8136baeea33b9b5c. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2023-54242?

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

- other: <https://git.kernel.org/stable/c/1655cfc85250a224b0d9486c8136baeea33b9b5c>
- other: <https://git.kernel.org/stable/c/c0346a59d719461248c6dc6f21c9e55ef836b66f>
- other: <https://git.kernel.org/stable/c/e53413f8deedf738a6782cc14cc00bd5852ccf18>

## 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-2023-54242>

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