lkml.org 
[lkml]   [2013]   [Dec]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3.5 018/103] ipv6: fix leaking uninitialized port number of offender sockaddr
    Date
    3.5.7.28 -stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Hannes Frederic Sowa <hannes@stressinduktion.org>

    commit 1fa4c710b6fe7b0aac9907240291b6fe6aafc3b8 upstream.

    Offenders don't have port numbers, so set it to 0.

    Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    [ luis: backported to 3.5: adjusted context ]
    Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
    ---
    net/ipv6/datagram.c | 1 +
    1 file changed, 1 insertion(+)

    diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c
    index 876739f..bbff67f 100644
    --- a/net/ipv6/datagram.c
    +++ b/net/ipv6/datagram.c
    @@ -377,6 +377,7 @@ int ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len, int *addr_len)
    if (serr->ee.ee_origin != SO_EE_ORIGIN_LOCAL) {
    sin->sin6_family = AF_INET6;
    sin->sin6_flowinfo = 0;
    + sin->sin6_port = 0;
    sin->sin6_scope_id = 0;
    if (skb->protocol == htons(ETH_P_IPV6)) {
    sin->sin6_addr = ipv6_hdr(skb)->saddr;
    --
    1.8.3.2


    \
     
     \ /
      Last update: 2013-12-17 21:01    [W:4.023 / U:0.180 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site