ALSA: seq: Fix function prototype mismatch in snd_seq_expand_var_event
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · < fccd454129f6a0739651f7f58307cdb631fd6e89| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ALSA: seq: Fix function prototype mismatch in snd_seq_expand_var_event
With clang's kernel control flow integrity (kCFI, CONFIG_CFI_CLANG), indirect call targets are validated against the expected function pointer prototype to make sure the call target is valid to help mitigate ROP attacks. If they are not identical, there is a failure at run time, which manifests as either a kernel panic or thread getting killed.
seq_copy_in_user() and seq_copy_in_kernel() did not have prototypes matching snd_seq_dump_func_t. Adjust this and remove the casts. There are not resulting binary output differences.
This was found as a result of Clang's new -Wcast-function-type-strict flag, which is more sensitive than the simpler -Wcast-function-type, which only checks for type width mismatches.
From the CVE record · Linux
ALSA sequencer functions in the Linux kernel have prototypes that do not match an indirect-call target. When the kernel is built with Clang kernel control flow integrity (CONFIG_CFI_CLANG), a call can fail at runtime, causing a kernel panic or killing a thread. The input does not establish how an attacker could trigger the call or whether access or user interaction is required.
Operators running Linux kernels with CONFIG_CFI_CLANG should check their kernel; affected versions are not specified.