powerpc/rtas: Prevent Spectre v1 gadget construction in sys_rtas()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · < 0974d03eb479384466d828d65637814bee6b26d7| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
powerpc/rtas: Prevent Spectre v1 gadget construction in sys_rtas()
Smatch warns:
arch/powerpc/kernel/rtas.c:1932 __do_sys_rtas() warn: potential spectre issue 'args.args' [r] (local cap)
The 'nargs' and 'nret' locals come directly from a user-supplied buffer and are used as indexes into a small stack-based array and as inputs to copy_to_user() after they are subject to bounds checks.
Use array_index_nospec() after the bounds checks to clamp these values for speculative execution.
From the CVE record · Linux
The Linux kernel’s powerpc/rtas sys_rtas() path can form a Spectre v1 gadget when it uses values from a user-supplied buffer as array indexes. A local user who can call this syscall may be able to trigger speculative access despite the bounds checks; the input does not establish a specific exploit outcome.
Engineers running Linux kernels with the powerpc/rtas component should check their kernel versions against the vendor advisory; affected versions were not provided.