Skip to content

RFC net: Do not accept packets with invalid huge size

Philippe Mathieu-Daudé qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2net: Do not accept packets bigger then NET_BUFSIZEnet/net.c net/queue.c+8 -05 replies
2/2net: Assert no packet bigger than NET_BUFSIZE is queuednet/queue.c+3 -01 reply

Reviews trailers per patch

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

Read the v1 thread

Cover letter [RFC PATCH-for-5.2 0/2] net: Do not accept packets with invalid huge size

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(+)
Signature · 1 line
2.26.2