diff options
| author | Jakub Kicinski <[email protected]> | 2021-01-13 04:22:14 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2021-01-13 04:22:15 +0000 |
| commit | 5527d0ea199354c798a63b50d911eeda6ee471ba (patch) | |
| tree | 06a00842a100de9d64eaac60c872e98a060714db /net/lapb/lapb_out.c | |
| parent | Merge branch 'mptcp-a-couple-of-fixes' (diff) | |
| parent | net/smc: use memcpy instead of snprintf to avoid out of bounds read (diff) | |
| download | kernel-5527d0ea199354c798a63b50d911eeda6ee471ba.tar.gz kernel-5527d0ea199354c798a63b50d911eeda6ee471ba.zip | |
Merge branch 'net-smc-fix-out-of-bound-access-in-netlink-interface'
Karsten Graul says:
====================
net/smc: fix out of bound access in netlink interface
Both patches fix possible out-of-bounds reads. The original code expected
that snprintf() reads len-1 bytes from source and appends the terminating
null, but actually snprintf() first copies len bytes and finally overwrites
the last byte with a null.
Fix this by using memcpy() and terminating the string afterwards.
====================
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/lapb/lapb_out.c')
0 files changed, 0 insertions, 0 deletions
