Skip to content

net/smc: fix out of bound access in netlink interface

Karsten Graul linux-s390 netdev 1 version Applied

Status from this message: This series was applied to netdev/net.git (refs/heads/master):

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesApplied 2/2

Patches in v1 All 2 applied

#Subject and filesSizeRepliesApplied
1/2smc: fix out of bound access in smc_nl_get_sys_info()net/smc/smc_core.c+2 -10 repliesApplied
2/2net/smc: use memcpy instead of snprintf to avoid out of bounds readnet/smc/smc_core.c net/smc/smc_ib.c net/smc/smc_ism.c+16 -100 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH net 0/2] net/smc: fix out of bound access in netlink interface

Please apply the following patch for smc to netdev's net tree.

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.

Guvenc Gulce (1):
net/smc: use memcpy instead of snprintf to avoid out of bounds read

Jakub Kicinski (1):
smc: fix out of bound access in smc_nl_get_sys_info()

 net/smc/smc_core.c | 20 +++++++++++++-------
 net/smc/smc_ib.c   |  6 +++---
 net/smc/smc_ism.c  |  3 ++-
 3 files changed, 18 insertions(+), 11 deletions(-)
Signature · 1 line
2.17.1