Patch "netrom: fix info leak via msg_name in nr_recvmsg()" has been added to the 3.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    netrom: fix info leak via msg_name in nr_recvmsg()

to the 3.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     netrom-fix-info-leak-via-msg_name-in-nr_recvmsg.patch
and it can be found in the queue-3.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 77d04b80c07c03ee66148b8d756a3dd27f11b3fc Mon Sep 17 00:00:00 2001
From: Mathias Krause <minipli@xxxxxxxxxxxxxx>
Date: Sun, 7 Apr 2013 01:51:57 +0000
Subject: netrom: fix info leak via msg_name in nr_recvmsg()


From: Mathias Krause <minipli@xxxxxxxxxxxxxx>

[ Upstream commits 3ce5efad47b62c57a4f5c54248347085a750ce0e and
  c802d759623acbd6e1ee9fbdabae89159a513913 ]

In case msg_name is set the sockaddr info gets filled out, as
requested, but the code fails to initialize the padding bytes of
struct sockaddr_ax25 inserted by the compiler for alignment. Also
the sax25_ndigis member does not get assigned, leaking four more
bytes.

Both issues lead to the fact that the code will leak uninitialized
kernel stack bytes in net/socket.c.

Fix both issues by initializing the memory with memset(0).

Signed-off-by: Mathias Krause <minipli@xxxxxxxxxxxxxx>
Cc: Ralf Baechle <ralf@xxxxxxxxxxxxxx>
Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 net/netrom/af_netrom.c |    1 +
 1 file changed, 1 insertion(+)

--- a/net/netrom/af_netrom.c
+++ b/net/netrom/af_netrom.c
@@ -1177,6 +1177,7 @@ static int nr_recvmsg(struct kiocb *iocb
 	}
 
 	if (sax != NULL) {
+		memset(sax, 0, sizeof(sax));
 		sax->sax25_family = AF_NETROM;
 		skb_copy_from_linear_data_offset(skb, 7, sax->sax25_call.ax25_call,
 			      AX25_ADDR_LEN);


Patches currently in stable-queue which might be from minipli@xxxxxxxxxxxxxx are

queue-3.4/irda-fix-missing-msg_namelen-update-in-irda_recvmsg_dgram.patch
queue-3.4/bluetooth-rfcomm-fix-missing-msg_namelen-update-in-rfcomm_sock_recvmsg.patch
queue-3.4/llc-fix-missing-msg_namelen-update-in-llc_ui_recvmsg.patch
queue-3.4/nfc-llcp-fix-info-leaks-via-msg_name-in-llcp_sock_recvmsg.patch
queue-3.4/atm-update-msg_namelen-in-vcc_recvmsg.patch
queue-3.4/iucv-fix-missing-msg_namelen-update-in-iucv_sock_recvmsg.patch
queue-3.4/ax25-fix-info-leak-via-msg_name-in-ax25_recvmsg.patch
queue-3.4/tipc-fix-info-leaks-via-msg_name-in-recv_msg-recv_stream.patch
queue-3.4/netrom-fix-info-leak-via-msg_name-in-nr_recvmsg.patch
queue-3.4/caif-fix-missing-msg_namelen-update-in-caif_seqpkt_recvmsg.patch
queue-3.4/bluetooth-fix-possible-info-leak-in-bt_sock_recvmsg.patch
queue-3.4/rose-fix-info-leak-via-msg_name-in-rose_recvmsg.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]