lkml.org 
[lkml]   [2012]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[ 019/218] dccp: fix info leak via getsockopt(DCCP_SOCKOPT_CCID_TX_INFO)
    Date
    3.4-stable review patch.  If anyone has any objections, please let me know.

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


    From: Mathias Krause <minipli@googlemail.com>

    [ Upstream commit 7b07f8eb75aa3097cdfd4f6eac3da49db787381d ]

    The CCID3 code fails to initialize the trailing padding bytes of struct
    tfrc_tx_info added for alignment on 64 bit architectures. It that for
    potentially leaks four bytes kernel stack via the getsockopt() syscall.
    Add an explicit memset(0) before filling the structure to avoid the
    info leak.

    Signed-off-by: Mathias Krause <minipli@googlemail.com>
    Cc: Gerrit Renker <gerrit@erg.abdn.ac.uk>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    net/dccp/ccids/ccid3.c | 1 +
    1 file changed, 1 insertion(+)

    --- a/net/dccp/ccids/ccid3.c
    +++ b/net/dccp/ccids/ccid3.c
    @@ -531,6 +531,7 @@ static int ccid3_hc_tx_getsockopt(struct
    case DCCP_SOCKOPT_CCID_TX_INFO:
    if (len < sizeof(tfrc))
    return -EINVAL;
    + memset(&tfrc, 0, sizeof(tfrc));
    tfrc.tfrctx_x = hc->tx_x;
    tfrc.tfrctx_x_recv = hc->tx_x_recv;
    tfrc.tfrctx_x_calc = hc->tx_x_calc;



    \
     
     \ /
      Last update: 2012-09-29 01:01    [W:4.120 / U:0.044 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site