diff options
| author | 2026-08-06 16:48:27 +0800 | |
|---|---|---|
| committer | 2026-09-23 12:24:40 +0200 | |
| commit | 9d3aedc075ebbf35f33cdc4221e02341760c0b9e (patch) | |
| tree | 56d86477fa5a6458d49eda5ed1c0c4ba7ad3ec4e /scripts/Makefile.thinlto | |
| parent | serdev: ttyport: Clear serport->tty after freeing (diff) | |
serial: core: Fix a potential NULL pointer dereference in uart_parse_earlycon()
console=uart and console=pl011 can reach the preferred console matching
path without an options field when a comma is absent from the command
line. In that case uart_parse_earlycon() receives a NULL pointer and
immediately passes it to strncmp(), which triggers a NULL pointer
dereference during console matching.
Address this by returning -EINVAL when the options pointer is missing,
ensuring incomplete console arguments are cleanly rejected while
preserving the behavior of all valid earlycon-style command lines.
As this is a trusted string, this is not a real security issue at all as
it can not normally happen.
Signed-off-by: Xiaochun Li <lixiaochun@open-hieco.net>
Link: https://patch.msgid.link/20260806084827.16239-1-lixiaochun@open-hieco.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
