netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] af_key: Fix for sadb_key memcpy read overrun
@ 2018-03-26 11:39 Kevin Easton
  2018-03-26 11:39 ` [PATCH 1/2] af_key: Use DIV_ROUND_UP() instead of open-coded equivalent Kevin Easton
  2018-03-26 11:39 ` [PATCH 2/2] af_key: Always verify length of provided sadb_key Kevin Easton
  0 siblings, 2 replies; 6+ messages in thread
From: Kevin Easton @ 2018-03-26 11:39 UTC (permalink / raw)
  To: Steffen Klassert, Herbert Xu, David S. Miller, netdev,
	linux-kernel

As found by syzbot, af_key does not properly validate the key length in
sadb_key messages from userspace.  This can result in copying from beyond
the end of the sadb_key part of the message, or indeed beyond the end of
the entire packet.

Kevin Easton (2):
  af_key: Use DIV_ROUND_UP() instead of open-coded equivalent
  af_key: Always verify length of provided sadb_key

 net/key/af_key.c | 58 ++++++++++++++++++++++++++++++++++++++++----------------
 1 file changed, 42 insertions(+), 16 deletions(-)

-- 
2.8.1

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

end of thread, other threads:[~2018-04-06  4:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-26 11:39 [PATCH 0/2] af_key: Fix for sadb_key memcpy read overrun Kevin Easton
2018-03-26 11:39 ` [PATCH 1/2] af_key: Use DIV_ROUND_UP() instead of open-coded equivalent Kevin Easton
2018-03-28  5:59   ` Steffen Klassert
2018-03-29  1:35     ` Kevin Easton
2018-04-06  4:31       ` Steffen Klassert
2018-03-26 11:39 ` [PATCH 2/2] af_key: Always verify length of provided sadb_key Kevin Easton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).