summaryrefslogtreecommitdiffstats
path: root/scripts/gdb/linux/tasks.py
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2023-11-25 13:05:04 +0100
committerDaniel Thompson <daniel.thompson@linaro.org>2024-01-17 17:19:06 +0000
commit4f41d30cd6dc865c3cbc1a852372321eba6d4e4c (patch)
tree54ea811ddad750131675cbc0c70e5f63da13ef7d /scripts/gdb/linux/tasks.py
parent610a9b8f49fbcf1100716370d3b5f6f884a2835a (diff)
downloadlinux-4f41d30cd6dc865c3cbc1a852372321eba6d4e4c.tar.gz
linux-4f41d30cd6dc865c3cbc1a852372321eba6d4e4c.tar.bz2
linux-4f41d30cd6dc865c3cbc1a852372321eba6d4e4c.zip
kdb: Fix a potential buffer overflow in kdb_local()
When appending "[defcmd]" to 'kdb_prompt_str', the size of the string already in the buffer should be taken into account. An option could be to switch from strncat() to strlcat() which does the correct test to avoid such an overflow. However, this actually looks as dead code, because 'defcmd_in_progress' can't be true here. See a more detailed explanation at [1]. [1]: https://lore.kernel.org/all/CAD=FV=WSh7wKN7Yp-3wWiDgX4E3isQ8uh0LCzTmd1v9Cg9j+nQ@mail.gmail.com/ Fixes: 5d5314d6795f ("kdb: core for kgdb back end (1 of 2)") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Douglas Anderson <dianders@chromium.org>
Diffstat (limited to 'scripts/gdb/linux/tasks.py')
0 files changed, 0 insertions, 0 deletions