Commit f15332e
committed
crypto: ccp: Fix for potential memory Out-of-Bounds access due to insufficient array size
In the function 'int sprint_symbol(char *buffer, unsigned long address)',
the buffer variable will undergo a write operation
"namebuf[KSYM_NAME_LEN - 1] = 0;" during the following call chain.
Call Trace:
tdm_get_cmd_context_hash -> sprint_symbol -> __sprint_symbol ->
kallsyms_lookup_buildid
Therefore, it is mandatory to ensure the buffer has a minimum size of
KSYM_NAME_LEN.
Signed-off-by: chench <chench@hygon.cn>1 parent ea28d48 commit f15332e
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
318 | | - | |
| 318 | + | |
319 | 319 | | |
320 | 320 | | |
321 | 321 | | |
| |||
0 commit comments