Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 71455 - ipt_ULOG.c fails to build in hardened-sources-2.4.27-r2
Summary: ipt_ULOG.c fails to build in hardened-sources-2.4.27-r2
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High major
Assignee: The Gentoo Linux Hardened Team
URL:
Whiteboard: scox
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-16 17:04 UTC by awk
Modified: 2005-01-01 21:56 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description awk 2004-11-16 17:04:44 UTC
I had CONFIG_IP_NF_TARGET_ULOG set and the compile failed with this error:

ipt_ULOG.c: In function `ip_ulog_fn':
ipt_ULOG.c:379: error: `qlen' undeclared (first use in this function)
ipt_ULOG.c:379: error: (Each undeclared identifier is reported only once
ipt_ULOG.c:379: error: for each function it appears in.)

The troublesome lines are:

        /* if threshold is reached, send message to userspace */
        if (qlen >= loginfo.qthreshold) {
                if (loginfo.qthreshold > 1)
                        nlh->nlmsg_type = NLMSG_DONE;
        }

The variable qlen isn't declared anywhere ("ub->qlen" is used elsewhere in the file). Also, the vanilla .27 sources don't have this problem (but they have a similar section that uses "ub->qlen"). The code above is created by 1000_patch-o-matic-ng.patch.

Interestingly, vanilla .26 has that lone "qlen" as well but also has a declaration "static size_t qlen", which never seems to be set or otherwise used. Maybe that's how this crept into the .27 patch.

I don't know enough to attempt a fix so I just compiled without CONFIG_IP_NF_TARGET_ULOG.
Comment 1 Max Hacking 2004-11-24 06:22:35 UTC
The bug can be fixed by changing the offending code to read

/* if threshold is reached, send message to userspace */
        if (ub->qlen >= loginfo.qthreshold) {
                if (loginfo.qthreshold > 1)
                        nlh->nlmsg_type = NLMSG_DONE;
        }

This fix has beem known for six months at least.  Come on guys.

http://forums.gentoo.org/viewtopic.php?p=1799054#1799054
Comment 2 Adam Mondl (RETIRED) gentoo-dev 2004-11-28 10:44:35 UTC
This problem is fixed in hardened-sources-2.4.28 which is in the tree now.
Comment 3 Adam Mondl (RETIRED) gentoo-dev 2005-01-01 21:56:05 UTC
Fixed in 2.4.28 ebuilds, please upgrade as they fix numerous vulnerabilities.