All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH-for-5.2 0/2] net: Do not accept packets with invalid huge size
@ 2020-11-27 15:45 Philippe Mathieu-Daudé
  2020-11-27 15:45 ` [RFC PATCH-for-5.2 1/2] net: Do not accept packets bigger then NET_BUFSIZE Philippe Mathieu-Daudé
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-11-27 15:45 UTC (permalink / raw)
  To: Jason Wang, qemu-devel
  Cc: Peter Maydell, Mauro Matteo Cascella, Daniel P . Berrange,
	Michael S . Tsirkin, P J P, Stefan Hajnoczi, Paolo Bonzini,
	Marc-André Lureau, Philippe Mathieu-Daudé

Hi,

This is a simple attempt to avoid the following pattern:

  ssize_t pkt_size = get_pkt_size(); // returns errno

  // no check

  send_packet(size_t size=pkt_size); // size casted to unsigned
                                     // -> overflow

Regards,

Phil.

Philippe Mathieu-Daudé (2):
  net: Do not accept packets bigger then NET_BUFSIZE
  net: Assert no packet bigger than NET_BUFSIZE is queued

 net/net.c   | 4 ++++
 net/queue.c | 7 +++++++
 2 files changed, 11 insertions(+)

-- 
2.26.2




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

end of thread, other threads:[~2020-12-04 14:03 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-27 15:45 [RFC PATCH-for-5.2 0/2] net: Do not accept packets with invalid huge size Philippe Mathieu-Daudé
2020-11-27 15:45 ` [RFC PATCH-for-5.2 1/2] net: Do not accept packets bigger then NET_BUFSIZE Philippe Mathieu-Daudé
2020-11-30  2:36   ` Jason Wang
2020-11-30  9:20     ` Mauro Matteo Cascella
2020-11-30  9:59       ` Philippe Mathieu-Daudé
2020-12-04 10:03   ` P J P
2020-12-04 14:01     ` Philippe Mathieu-Daudé
2020-11-27 15:45 ` [RFC PATCH-for-5.2 2/2] net: Assert no packet bigger than NET_BUFSIZE is queued Philippe Mathieu-Daudé
2020-11-30  2:50   ` Jason Wang
2020-11-27 15:47 ` [RFC PATCH-for-5.2 0/2] net: Do not accept packets with invalid huge size Philippe Mathieu-Daudé
2020-11-28 20:59 ` Peter Maydell
2020-11-30 10:02   ` Philippe Mathieu-Daudé

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.