Commit e862f1a9 authored by Mathias Krause's avatar Mathias Krause Committed by David S. Miller

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: default avatarMathias Krause <minipli@googlemail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e3bc4ffb
...@@ -812,6 +812,7 @@ int vcc_getsockopt(struct socket *sock, int level, int optname, ...@@ -812,6 +812,7 @@ int vcc_getsockopt(struct socket *sock, int level, int optname,
if (!vcc->dev || !test_bit(ATM_VF_ADDR, &vcc->flags)) if (!vcc->dev || !test_bit(ATM_VF_ADDR, &vcc->flags))
return -ENOTCONN; return -ENOTCONN;
memset(&pvc, 0, sizeof(pvc));
pvc.sap_family = AF_ATMPVC; pvc.sap_family = AF_ATMPVC;
pvc.sap_addr.itf = vcc->dev->number; pvc.sap_addr.itf = vcc->dev->number;
pvc.sap_addr.vpi = vcc->vpi; pvc.sap_addr.vpi = vcc->vpi;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment