net/sched: sch_fq: fix integer overflow of "credit"
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ afe4fd062416b158a8a8538b23adc1930a9b88dc · < 7041101ff6c3073fd8f2e99920f535b111c929cb| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net/sched: sch_fq: fix integer overflow of "credit"
if sch_fq is configured with "initial quantum" having values greater than INT_MAX, the first assignment of "credit" does signed integer overflow to a very negative value. In this situation, the syzkaller script provided by Cristoph triggers the CPU soft-lockup warning even with few sockets. It's not an infinite loop, but "credit" wasn't probably meant to be minus 2Gb for each new flow. Capping "initial quantum" to INT_MAX proved to fix the issue.
v2: validation of "initial quantum" is done in fq_policy, instead of open coding in fq_change() _ suggested by Jakub Kicinski
From the CVE record · Linux
The Linux kernel's sch_fq scheduler can overflow its credit value when configured with an initial quantum greater than INT_MAX. Under that configuration, a syzkaller script can trigger a CPU soft-lockup warning even with few sockets; the input does not specify authentication requirements or user interaction.
Operators running the Linux kernel should check systems using sch_fq; affected versions are not specified.