[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH-for-5.2 0/2] net: Do not accept packets with invalid huge siz
From: |
Philippe Mathieu-Daudé |
Subject: |
[RFC PATCH-for-5.2 0/2] net: Do not accept packets with invalid huge size |
Date: |
Fri, 27 Nov 2020 16:45:22 +0100 |
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