mirror of
https://github.com/torvalds/linux.git
synced 2026-06-09 07:03:37 +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
f9b6caca04
commit
9a897ce370
|
|
@ -784,6 +784,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