diff options
| author | Kees Cook <[email protected]> | 2023-01-27 22:39:21 +0000 |
|---|---|---|
| committer | Kees Cook <[email protected]> | 2023-02-08 23:26:58 +0000 |
| commit | 48df133578c70185a95a49390d42df1996ddba2a (patch) | |
| tree | a7956907fe0141e4ed3ec9d552c520259d6d72ae /lib/string.c | |
| parent | Merge branch 'for-linus/hardening' into for-next/hardening (diff) | |
| download | kernel-48df133578c70185a95a49390d42df1996ddba2a.tar.gz kernel-48df133578c70185a95a49390d42df1996ddba2a.zip | |
coda: Avoid partial allocation of sig_inputArgs
GCC does not like having a partially allocated object, since it cannot
reason about it for bounds checking when it is passed to other code.
Instead, fully allocate sig_inputArgs. (Alternatively, sig_inputArgs
should be defined as a struct coda_in_hdr, if it is actually not using
any other part of the union.) Seen under GCC 13:
../fs/coda/upcall.c: In function 'coda_upcall':
../fs/coda/upcall.c:801:22: warning: array subscript 'union inputArgs[0]' is partly outside array bounds of 'unsigned char[20]' [-Warray-bounds=]
801 | sig_inputArgs->ih.opcode = CODA_SIGNAL;
| ^~
Cc: Jan Harkes <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Kees Cook <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'lib/string.c')
0 files changed, 0 insertions, 0 deletions
