diff options
author | Mathias Krause <minipli@googlemail.com> | 2012-08-15 07:31:44 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-08-16 00:36:30 -0400 |
commit | e862f1a9b7df4e8196ebec45ac62295138aa3fc2 (patch) | |
tree | f4c48c1350cd8fe6531eb1fd7cf61b6173524c04 /net/atm | |
parent | e3bc4ffb814c847bde7706a80d5684d12c676a8b (diff) |
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>
Diffstat (limited to 'net/atm')
-rw-r--r-- | net/atm/common.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/atm/common.c b/net/atm/common.c index b4b44dbed645..0c0ad930a632 100644 --- a/net/atm/common.c +++ b/net/atm/common.c | |||
@@ -812,6 +812,7 @@ int vcc_getsockopt(struct socket *sock, int level, int optname, | |||
812 | 812 | ||
813 | if (!vcc->dev || !test_bit(ATM_VF_ADDR, &vcc->flags)) | 813 | if (!vcc->dev || !test_bit(ATM_VF_ADDR, &vcc->flags)) |
814 | return -ENOTCONN; | 814 | return -ENOTCONN; |
815 | memset(&pvc, 0, sizeof(pvc)); | ||
815 | pvc.sap_family = AF_ATMPVC; | 816 | pvc.sap_family = AF_ATMPVC; |
816 | pvc.sap_addr.itf = vcc->dev->number; | 817 | pvc.sap_addr.itf = vcc->dev->number; |
817 | pvc.sap_addr.vpi = vcc->vpi; | 818 | pvc.sap_addr.vpi = vcc->vpi; |