Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1244243

Re: [PATCH] icmp: Fixed bug in raw sockets causing incorrect ICMP SNMP counter values

From Eric Dumazet <eric.dumazet@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH] icmp: Fixed bug in raw sockets causing incorrect ICMP SNMP counter values
Date 2015-10-12 00:50 +0200
Message-ID <qixBg-5nH-1@gated-at.bofh.it> (permalink)
References <qiwvw-3Qd-15@gated-at.bofh.it> <qix8d-4PI-1@gated-at.bofh.it> <qix8e-4PI-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sun, 2015-10-11 at 23:17 +0100, Ben Cox wrote:
> Forgive me for possibly being a little stupid here (This is my first
> patch to Linux so I am slightly over my head)
> 
> Is this issue not addressed above the file where the following check is done?
> 
> if (iphlen > length)
>     goto error_free;
> 

Imagine someone sends a frame, pretending it is ICMP, but containing
only the IPv4 header. And not a _single_ byte more.

length = 20

iphlen = 20 (if say ihl == 5)

We copied 20 bytes from user land.

But your code reads 21th byte.



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] icmp: Fixed bug in raw sockets causing incorrect ICMP SNMP  counter values Ben Cartwright-Cox <ben@benjojo.co.uk> - 2015-10-11 23:40 +0200
  Re: [PATCH] icmp: Fixed bug in raw sockets causing incorrect ICMP  SNMP counter values Eric Dumazet <eric.dumazet@gmail.com> - 2015-10-12 00:20 +0200
    Re: [PATCH] icmp: Fixed bug in raw sockets causing incorrect ICMP  SNMP counter values Ben Cox <ben@benjojo.co.uk> - 2015-10-12 00:20 +0200
      Re: [PATCH] icmp: Fixed bug in raw sockets causing incorrect ICMP  SNMP counter values Eric Dumazet <eric.dumazet@gmail.com> - 2015-10-12 00:50 +0200
        Re: [PATCH] icmp: Fixed bug in raw sockets causing incorrect ICMP  SNMP counter values Eric Dumazet <eric.dumazet@gmail.com> - 2015-10-12 00:50 +0200
          Re: [PATCH] icmp: Fixed bug in raw sockets causing incorrect ICMP  SNMP counter values Eric Dumazet <eric.dumazet@gmail.com> - 2015-10-12 01:20 +0200
            Re: [PATCH] icmp: Fixed bug in raw sockets causing incorrect ICMP  SNMP counter values Ben Cox <ben@benjojo.co.uk> - 2015-10-12 01:20 +0200
              Re: [PATCH] icmp: Fixed bug in raw sockets causing incorrect ICMP  SNMP counter values Eric Dumazet <eric.dumazet@gmail.com> - 2015-10-12 01:40 +0200

csiph-web