Patch "irda: Fix missing msg_namelen update in irda_recvmsg_dgram()" has been added to the 3.8-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

    irda: Fix missing msg_namelen update in irda_recvmsg_dgram()

to the 3.8-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:
     irda-fix-missing-msg_namelen-update-in-irda_recvmsg_dgram.patch
and it can be found in the queue-3.8 subdirectory.

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


>From cb16330582275171956014a0d17878f86ebe00ca Mon Sep 17 00:00:00 2001
From: Mathias Krause <minipli@xxxxxxxxxxxxxx>
Date: Sun, 7 Apr 2013 01:51:53 +0000
Subject: irda: Fix missing msg_namelen update in irda_recvmsg_dgram()


From: Mathias Krause <minipli@xxxxxxxxxxxxxx>

[ Upstream commit 5ae94c0d2f0bed41d6718be743985d61b7f5c47d ]

The current code does not fill the msg_name member in case it is set.
It also does not set the msg_namelen member to 0 and therefore makes
net/socket.c leak the local, uninitialized sockaddr_storage variable
to userland -- 128 bytes of kernel stack memory.

Fix that by simply setting msg_namelen to 0 as obviously nobody cared
about irda_recvmsg_dgram() not filling the msg_name in case it was
set.

Signed-off-by: Mathias Krause <minipli@xxxxxxxxxxxxxx>
Cc: Samuel Ortiz <samuel@xxxxxxxxxx>
Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 net/irda/af_irda.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/net/irda/af_irda.c
+++ b/net/irda/af_irda.c
@@ -1386,6 +1386,8 @@ static int irda_recvmsg_dgram(struct kio
 
 	IRDA_DEBUG(4, "%s()\n", __func__);
 
+	msg->msg_namelen = 0;
+
 	skb = skb_recv_datagram(sk, flags & ~MSG_DONTWAIT,
 				flags & MSG_DONTWAIT, &err);
 	if (!skb)


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

queue-3.8/irda-fix-missing-msg_namelen-update-in-irda_recvmsg_dgram.patch
queue-3.8/bluetooth-rfcomm-fix-missing-msg_namelen-update-in-rfcomm_sock_recvmsg.patch
queue-3.8/llc-fix-missing-msg_namelen-update-in-llc_ui_recvmsg.patch
queue-3.8/nfc-llcp-fix-info-leaks-via-msg_name-in-llcp_sock_recvmsg.patch
queue-3.8/atm-update-msg_namelen-in-vcc_recvmsg.patch
queue-3.8/iucv-fix-missing-msg_namelen-update-in-iucv_sock_recvmsg.patch
queue-3.8/ax25-fix-info-leak-via-msg_name-in-ax25_recvmsg.patch
queue-3.8/tipc-fix-info-leaks-via-msg_name-in-recv_msg-recv_stream.patch
queue-3.8/netrom-fix-info-leak-via-msg_name-in-nr_recvmsg.patch
queue-3.8/caif-fix-missing-msg_namelen-update-in-caif_seqpkt_recvmsg.patch
queue-3.8/l2tp-fix-info-leak-in-l2tp_ip6_recvmsg.patch
queue-3.8/bluetooth-sco-fix-missing-msg_namelen-update-in-sco_sock_recvmsg.patch
queue-3.8/bluetooth-fix-possible-info-leak-in-bt_sock_recvmsg.patch
queue-3.8/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]