Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;