Merge "net: qrtr: fix a kernel-infoleak in qrtr_recvmsg()"
This commit is contained in:
commit
65ce6f8272
1 changed files with 5 additions and 0 deletions
|
@ -1731,6 +1731,11 @@ static int qrtr_recvmsg(struct socket *sock, struct msghdr *msg,
|
||||||
rc = copied;
|
rc = copied;
|
||||||
|
|
||||||
if (addr) {
|
if (addr) {
|
||||||
|
/* There is an anonymous 2-byte hole after sq_family,
|
||||||
|
* make sure to clear it.
|
||||||
|
*/
|
||||||
|
memset(addr, 0, sizeof(*addr));
|
||||||
|
|
||||||
addr->sq_family = AF_QIPCRTR;
|
addr->sq_family = AF_QIPCRTR;
|
||||||
addr->sq_node = cb->src_node;
|
addr->sq_node = cb->src_node;
|
||||||
addr->sq_port = cb->src_port;
|
addr->sq_port = cb->src_port;
|
||||||
|
|
Loading…
Reference in a new issue