drm/amdgpu/vcn: fix integer overflow in dec_msg buffer count check
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ b193019860d61e92da395eae2011f2f6716b182f · < 4d7390530853eb7befda9cc786e4c86e8ad7ac9e| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
drm/amdgpu/vcn: fix integer overflow in dec_msg buffer count check
If the supplied msg[2] (num_buffers) is 0x3FFFFFFF, the expression 6 + num_buffers * 4 wraps to 2 and the bounds check passes, letting the parser loop far past the end of the message BO. Triggering it additionally requires a ~4GiB mapping so that msg[1] survives the earlier "header does not fit in BO" check.
Rewrite the test in division form, which is overflow-free by construction. Also update the message to reflect that msg is invalid.
From the CVE record · Linux
An integer overflow in the amdgpu VCN decoder message buffer-count check can let a crafted message pass validation, causing the parser to loop far past the end of the message buffer object. Triggering it also requires an approximately 4 GiB mapping; the input does not specify authentication or user-interaction requirements.
Engineers running Linux kernels with the amdgpu VCN component should check their versions against the vendor advisory; affected versions are not specified.