Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 155876

Summary: Incorrect pointers in net-misc/l7-filter-2.6 kernel module
Product: Gentoo Linux Reporter: nickk2
Component: Current packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: VERIFIED DUPLICATE    
Severity: normal    
Priority: High    
Version: 2006.0   
Hardware: x86   
OS: Other   
Whiteboard:
Package list:
Runtime testing required: ---

Description nickk2 2006-11-21 11:21:15 UTC
I have observed this using kernel 2.6.18 - I'm not sure if the patches for other kernels have the same problem.

In linux/net/ipv4/netfilter/ipt_layer7.c, at line 471, the original source looks like:

    static struct ipt_match layer7_match = {
        .name = "layer7",
        .match = &match,
        .checkentry = &checkentry,
    ....
    };

The members match and checkentry in ipt_match (really struct xt_match in include/linux/netfilter/x_tables.h) are pointers to functions.

In ipt_layer7.c match and checkentry are the names of two functions that are placed into this structure. They're inserted as a pointer to a function pointer, which I'm pretty sure is not good.

This can be fixed by changing two of layer7_match's members from:
        .match = &match,
        .checkentry = &checkentry,

to

        .match = match,
        .checkentry = checkentry,
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-11-21 11:23:43 UTC

*** This bug has been marked as a duplicate of 155874 ***
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2006-11-21 11:23:53 UTC
Dupe.