public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net 0/2] net/smc: fix out of bound access in netlink interface
@ 2021-01-12 16:21 Karsten Graul
  2021-01-12 16:21 ` [PATCH net 1/2] smc: fix out of bound access in smc_nl_get_sys_info() Karsten Graul
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Karsten Graul @ 2021-01-12 16:21 UTC (permalink / raw)
  To: David Miller, Jakub Kicinski
  Cc: Heiko Carstens, Stefan Raspl, netdev, linux-s390

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(-)

-- 
2.17.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-01-13  4:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-12 16:21 [PATCH net 0/2] net/smc: fix out of bound access in netlink interface Karsten Graul
2021-01-12 16:21 ` [PATCH net 1/2] smc: fix out of bound access in smc_nl_get_sys_info() Karsten Graul
2021-01-12 16:21 ` [PATCH net 2/2] net/smc: use memcpy instead of snprintf to avoid out of bounds read Karsten Graul
2021-01-13  4:30 ` [PATCH net 0/2] net/smc: fix out of bound access in netlink interface patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox