lkml.org 
[lkml]   [2008]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 67/76] NETFILTER: nfnetlink_queue: fix computation of allocated size for netlink skb
    -stable review patch.  If anyone has any objections, please let us know.
    ---------------------

    From: Eric Leblond <eric@inl.fr>

    Upstream commit cabaa9bf:

    Size of the netlink skb was wrongly computed because the formula was using
    NLMSG_ALIGN instead of NLMSG_SPACE. NLMSG_ALIGN does not add the room for
    netlink header as NLMSG_SPACE does. This was causing a failure of message
    building in some cases.

    On my test system, all messages for packets in range [8*k+41, 8*k+48] where k
    is an integer were invalid and the corresponding packets were dropped.

    Signed-off-by: Eric Leblond <eric@inl.fr>
    Signed-off-by: Patrick McHardy <kaber@trash.net>
    Signed-off-by: Chris Wright <chrisw@sous-sol.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
    ---

    net/netfilter/nfnetlink_queue.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/net/netfilter/nfnetlink_queue.c
    +++ b/net/netfilter/nfnetlink_queue.c
    @@ -353,7 +353,7 @@ nfqnl_build_packet_message(struct nfqnl_

    QDEBUG("entered\n");

    - size = NLMSG_ALIGN(sizeof(struct nfgenmsg))
    + size = NLMSG_SPACE(sizeof(struct nfgenmsg))
    + nla_total_size(sizeof(struct nfqnl_msg_packet_hdr))
    + nla_total_size(sizeof(u_int32_t)) /* ifindex */
    + nla_total_size(sizeof(u_int32_t)) /* ifindex */
    --


    \
     
     \ /
      Last update: 2008-03-21 23:55    [W:0.020 / U:2.808 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site