------------------------------------------------------------ revno: 11839 revision-id: squid3@treenet.co.nz-20160330142353-b3tvenndc4jqscj8 parent: squid3@treenet.co.nz-20150828132626-owdtan8w68jox4sn author: Yuriy M. Kaminskiy committer: Amos Jeffries branch nick: 3.2 timestamp: Thu 2016-03-31 03:23:53 +1300 message: pinger: Fix buffer overflow in Icmp6::Recv ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20160330142353-b3tvenndc4jqscj8 # target_branch: http://bzr.squid-cache.org/bzr/squid3/branches\ # /SQUID_3_2 # testament_sha1: b14da07f85e822986bd3ef5aaf55d73616db3f58 # timestamp: 2016-03-30 14:50:34 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/3.2 # base_revision_id: squid3@treenet.co.nz-20150828132626-\ # owdtan8w68jox4sn # # Begin patch === modified file 'src/icmp/Icmp6.cc' --- src/icmp/Icmp6.cc 2014-09-15 05:08:18 +0000 +++ src/icmp/Icmp6.cc 2016-03-30 14:23:53 +0000 @@ -280,7 +280,7 @@ ip = (struct ip6_hdr *) pkt; - pkt += sizeof(ip6_hdr); + NP: echo size needs to +sizeof(ip6_hdr); debugs(42,0, HERE << "ip6_nxt=" << ip->ip6_nxt << ", ip6_plen=" << ip->ip6_plen << @@ -291,7 +291,6 @@ */ icmp6header = (struct icmp6_hdr *) pkt; - pkt += sizeof(icmp6_hdr); if (icmp6header->icmp6_type != ICMP6_ECHO_REPLY) { @@ -316,7 +315,7 @@ return; } - echo = (icmpEchoData *) pkt; + echo = (icmpEchoData *) (pkt + sizeof(icmp6_hdr)); preply.opcode = echo->opcode;