mirror of
https://github.com/torvalds/linux.git
synced 2026-06-09 23:23:53 +02:00
atm: fix info leak in getsockopt(SO_ATMPVC)
[ Upstream commit e862f1a9b7 ]
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
84a2d3c44c
commit
5b26dbdd5f
|
|
@ -812,6 +812,7 @@ int vcc_getsockopt(struct socket *sock, int level, int optname,
|
|||
|
||||
if (!vcc->dev || !test_bit(ATM_VF_ADDR, &vcc->flags))
|
||||
return -ENOTCONN;
|
||||
memset(&pvc, 0, sizeof(pvc));
|
||||
pvc.sap_family = AF_ATMPVC;
|
||||
pvc.sap_addr.itf = vcc->dev->number;
|
||||
pvc.sap_addr.vpi = vcc->vpi;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user