CVE-2023-53553
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
04/10/2025
Last modified:
06/10/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
HID: hyperv: avoid struct memcpy overrun warning<br />
<br />
A previous patch addressed the fortified memcpy warning for most<br />
builds, but I still see this one with gcc-9:<br />
<br />
In file included from include/linux/string.h:254,<br />
from drivers/hid/hid-hyperv.c:8:<br />
In function &#39;fortify_memcpy_chk&#39;,<br />
inlined from &#39;mousevsc_on_receive&#39; at drivers/hid/hid-hyperv.c:272:3:<br />
include/linux/fortify-string.h:583:4: error: call to &#39;__write_overflow_field&#39; declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Werror=attribute-warning]<br />
583 | __write_overflow_field(p_size_field, size);<br />
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
<br />
My guess is that the WARN_ON() itself is what confuses gcc, so it no<br />
longer sees that there is a correct range check. Rework the code in a<br />
way that helps readability and avoids the warning.



