]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ipv6: avoid overflow of offset in ip6_find_1stfragopt
authorSabrina Dubroca <sd@queasysnail.net>
Wed, 19 Jul 2017 20:28:55 +0000 (22:28 +0200)
committerDhaval Giani <dhaval.giani@oracle.com>
Wed, 25 Oct 2017 02:28:01 +0000 (22:28 -0400)
commitbefaa5d785b3ac44391f731918e543461f8fef5b
tree9fea46235fd214ccc375a53455a075cc162df406
parent015863aacea1bf013e0174de82152f3551cc5720
ipv6: avoid overflow of offset in ip6_find_1stfragopt

Orabug: 26540159
CVE: CVE-2017-7542

In some cases, offset can overflow and can cause an infinite loop in
ip6_find_1stfragopt(). Make it unsigned int to prevent the overflow, and
cap it at IPV6_MAXPLEN, since packets larger than that should be invalid.

This problem has been here since before the beginning of git history.

Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 6399f1fae4ec29fab5ec76070435555e256ca3a6)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
Signed-off-by: Dhaval Giani <dhaval.giani@oracle.com>
net/ipv6/output_core.c