--- a/net/qrtr/qrtr.c +++ b/net/qrtr/qrtr.c @@ -819,6 +819,11 @@ static int qrtr_recvmsg(struct socket *s rc = copied; 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_node = le32_to_cpu(phdr->src_node_id); addr->sq_port = le32_to_cpu(phdr->src_port_id);