[NETFILTER]: Fix crash in ip_nat_pptp

When an inbound PPTP_IN_CALL_REQUEST packet is received the
PPTP NAT helper uses a NULL pointer in pointer arithmentic to
calculate the offset in the packet which needs to be mangled
and corrupts random memory or crashes.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Patrick McHardy and committed by
David S. Miller
15db3470 bb94aa16

+1 -1
+1 -1
net/ipv4/netfilter/ip_nat_helper_pptp.c
··· 315 break; 316 case PPTP_IN_CALL_REQUEST: 317 /* only need to nat in case PAC is behind NAT box */ 318 - break; 319 case PPTP_WAN_ERROR_NOTIFY: 320 pcid = &pptpReq->wanerr.peersCallID; 321 break;
··· 315 break; 316 case PPTP_IN_CALL_REQUEST: 317 /* only need to nat in case PAC is behind NAT box */ 318 + return NF_ACCEPT; 319 case PPTP_WAN_ERROR_NOTIFY: 320 pcid = &pptpReq->wanerr.peersCallID; 321 break;