summaryrefslogtreecommitdiff
path: root/net/ipv4/raw.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-06-01 17:51:08 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-06-01 17:51:08 +0200
commit1bab7eea6ecd7325ed62daecc8cd3a8f5b20f26f (patch)
treef9a23c140fe90e3959231d1f5e4b6e4e218895a3 /net/ipv4/raw.c
parent799289456aa4a482feecff17333b1113a963511b (diff)
parent18ad16ce4a6b2714583fd1e1044c6ea8e53b3519 (diff)
Merge v6.18.34linux-rolling-lts
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/ipv4/raw.c')
-rw-r--r--net/ipv4/raw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c
index d54ebb7df966..f79f4c29a043 100644
--- a/net/ipv4/raw.c
+++ b/net/ipv4/raw.c
@@ -390,7 +390,7 @@ static int raw_send_hdrinc(struct sock *sk, struct flowi4 *fl4,
* in, reject the frame as invalid
*/
err = -EINVAL;
- if (iphlen > length)
+ if (iphlen > length || iphlen < sizeof(*iph))
goto error_free;
if (iphlen >= sizeof(*iph)) {