Skip to content

Commit e862f1a

Browse files
miniplidavem330
authored andcommitted
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>
1 parent e3bc4ff commit e862f1a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: net/atm/common.c

+1
Original file line numberDiff line numberDiff line change
@@ -812,6 +812,7 @@ int vcc_getsockopt(struct socket *sock, int level, int optname,
812812

813813
if (!vcc->dev || !test_bit(ATM_VF_ADDR, &vcc->flags))
814814
return -ENOTCONN;
815+
memset(&pvc, 0, sizeof(pvc));
815816
pvc.sap_family = AF_ATMPVC;
816817
pvc.sap_addr.itf = vcc->dev->number;
817818
pvc.sap_addr.vpi = vcc->vpi;

0 commit comments

Comments
 (0)