kho: make sure scratch size is always aligned by CMA_MIN_ALIGNMENT_BYTES
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
6.18.427.1.57.2In the Linux kernel, the following vulnerability has been resolved:
kho: make sure scratch size is always aligned by CMA_MIN_ALIGNMENT_BYTES
When using scratch_scale, the scratch sizes are rounded up to CMA_MIN_ALIGNMENT_BYTES since they will be released as MIGRATE_CMA. This is not done when using fixed scratch sizes via command line. This can result in user specifying a size which is not aligned, and thus kernel releasing a pageblock that is only partially scratch.
Do the rounding up for both cases in scratch_size_update().
From the CVE record · Linux
The kho component does not round fixed scratch sizes specified on the command line to CMA_MIN_ALIGNMENT_BYTES. If a specified size is unaligned, the kernel can release a pageblock that is only partially scratch. The input does not describe an attacker path or required access.
Engineers running Linux kernels that use fixed kho scratch sizes specified on the command line should check their deployments; affected versions are not specified.