Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

atm: fix info leak in getsockopt(SO_ATMPVC)

The ATM code fails to initialize the two padding bytes of struct
sockaddr_atmpvc inserted for alignment. Add an explicit memset(0)
before filling the structure to avoid the info leak.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Mathias Krause and committed by
David S. Miller
e862f1a9 e3bc4ffb

+1
+1
net/atm/common.c
··· 812 812 813 813 if (!vcc->dev || !test_bit(ATM_VF_ADDR, &vcc->flags)) 814 814 return -ENOTCONN; 815 + memset(&pvc, 0, sizeof(pvc)); 815 816 pvc.sap_family = AF_ATMPVC; 816 817 pvc.sap_addr.itf = vcc->dev->number; 817 818 pvc.sap_addr.vpi = vcc->vpi;