net: hamradio: 6pack: fix uninit-value in sixpack_receive_buf
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · < 987af7625ceb1ee59d70eb0abd7af11c75e45d79| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net: hamradio: 6pack: fix uninit-value in sixpack_receive_buf
sixpack_receive_buf() does not properly skip bytes with TTY error flags. The while loop iterates through the flags buffer but never advances the data pointer (cp), and passes the original count (including error bytes) to sixpack_decode(). This causes sixpack_decode() to process bytes that should have been skipped due to TTY errors. The TTY layer does not guarantee that cp[i] holds a meaningful value when fp[i] is set, so passing those positions to sixpack_decode() results in KMSAN reporting an uninit-value read.
Fix this by processing bytes one at a time, advancing cp on each iteration, and only passing valid (non-error) bytes to sixpack_decode(). This matches the pattern used by slip_receive_buf() and mkiss_receive_buf() for the same purpose.
From the CVE record · Linux
The Linux kernel’s hamradio 6pack receive path can pass bytes marked with TTY errors to its decoder, causing an uninitialized-value read. The input does not specify an attacker action, access requirement, or user interaction needed to trigger it.
Engineers running Linux kernels that use the hamradio 6pack component should check whether their kernel is affected; affected versions are not specified.