mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
atm: fix info leak via getsockname()
[ Upstream commit 3c0c5cfdcd
]
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
5b26dbdd5f
commit
458ed5622e
1 changed files with 1 additions and 0 deletions
|
@ -95,6 +95,7 @@ static int pvc_getname(struct socket *sock, struct sockaddr *sockaddr,
|
||||||
return -ENOTCONN;
|
return -ENOTCONN;
|
||||||
*sockaddr_len = sizeof(struct sockaddr_atmpvc);
|
*sockaddr_len = sizeof(struct sockaddr_atmpvc);
|
||||||
addr = (struct sockaddr_atmpvc *)sockaddr;
|
addr = (struct sockaddr_atmpvc *)sockaddr;
|
||||||
|
memset(addr, 0, sizeof(*addr));
|
||||||
addr->sap_family = AF_ATMPVC;
|
addr->sap_family = AF_ATMPVC;
|
||||||
addr->sap_addr.itf = vcc->dev->number;
|
addr->sap_addr.itf = vcc->dev->number;
|
||||||
addr->sap_addr.vpi = vcc->vpi;
|
addr->sap_addr.vpi = vcc->vpi;
|
||||||
|
|
Loading…
Reference in a new issue