diff options
author | Bui Quang Minh <[email protected]> | 2024-04-24 21:44:19 +0700 |
---|---|---|
committer | Jakub Kicinski <[email protected]> | 2024-04-25 19:23:12 -0700 |
commit | 8c34096c7fdf272fd4c0c37fe411cd2e3ed0ee9f (patch) | |
tree | 3291b3173cc5412687a8c7949e6befa24fcdf426 /tools/perf/scripts/python/net_dropmonitor.py | |
parent | 666854ea9cad844f75a068f32812a2d78004914a (diff) |
bna: ensure the copied buf is NUL terminated
Currently, we allocate a nbytes-sized kernel buffer and copy nbytes from
userspace to that buffer. Later, we use sscanf on this buffer but we don't
ensure that the string is terminated inside the buffer, this can lead to
OOB read when using sscanf. Fix this issue by using memdup_user_nul
instead of memdup_user.
Fixes: 7afc5dbde091 ("bna: Add debugfs interface.")
Signed-off-by: Bui Quang Minh <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/net_dropmonitor.py')
0 files changed, 0 insertions, 0 deletions