lkml.org 
[lkml]   [2004]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH] compat bug in sys_recvmsg, MSG_CMSG_COMPAT check missing

    packet_recvmsg() gets the flags from the compat_sys_socketcall(), but it
    does not check for the active MSG_CMSG_COMPAT bit. As a result, it
    returns -EINVAL and makes the user rather unhappy


    diff -purN linux-2.6.7-rc2-bk5.orig/net/packet/af_packet.c linux-2.6.7-rc2-bk5/net/packet/af_packet.c
    --- linux-2.6.7-rc2-bk5.orig/net/packet/af_packet.c 2004-06-05 09:34:48.000000000 +0200
    +++ linux-2.6.7-rc2-bk5/net/packet/af_packet.c 2004-06-05 22:32:16.000000000 +0200
    @@ -1037,7 +1037,7 @@ static int packet_recvmsg(struct kiocb *
    int copied, err;

    err = -EINVAL;
    - if (flags & ~(MSG_PEEK|MSG_DONTWAIT|MSG_TRUNC))
    + if (flags & ~(MSG_PEEK|MSG_DONTWAIT|MSG_TRUNC|MSG_CMSG_COMPAT))
    goto out;

    #if 0
    --
    USB is for mice, FireWire is for men!
    sUse lINUX ag, nÜRNBERG
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 14:03    [W:0.020 / U:31.664 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site