diff options
| author | Gustavo A. R. Silva <[email protected]> | 2023-09-15 18:43:20 +0000 |
|---|---|---|
| committer | Kees Cook <[email protected]> | 2023-09-29 21:48:32 +0000 |
| commit | 8fddc4b660273f96f2d216b04642b070a59c019c (patch) | |
| tree | 15454371b1450af64e9e549fa4aa9c5a9863a9a7 /scripts/gcc-plugins/randomize_layout_plugin.c | |
| parent | EDAC/mc_sysfs: Replace deprecated strncpy() with memcpy() (diff) | |
| download | kernel-8fddc4b660273f96f2d216b04642b070a59c019c.tar.gz kernel-8fddc4b660273f96f2d216b04642b070a59c019c.zip | |
drm/gud: Use size_add() in call to struct_size()
If, for any reason, the open-coded arithmetic causes a wraparound, the
protection that `struct_size()` adds against potential integer overflows
is defeated. Fix this by hardening call to `struct_size()` with `size_add()`.
Fixes: 40e1a70b4aed ("drm: Add GUD USB Display driver")
Signed-off-by: "Gustavo A. R. Silva" <[email protected]>
Reviewed-by: Kees Cook <[email protected]>
Link: https://lore.kernel.org/r/ZQSlyHKPdw/zsy4c@work
Signed-off-by: Kees Cook <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/randomize_layout_plugin.c')
0 files changed, 0 insertions, 0 deletions
