Bug 15765

Summary: ulog_packet_msg should use fixed-size fields
Product: Networking Reporter: Jurij Smakov (jurij)
Component: Netfilter/IptablesAssignee: networking_netfilter-iptables (networking_netfilter-iptables)
Status: RESOLVED WILL_NOT_FIX    
Severity: normal CC: alan, kaber
Priority: P1    
Hardware: All   
OS: Linux   
URL: http://bugs.debian.org/265985
Kernel Version: 2.6.32.11 Subsystem:
Regression: No Bisected commit-id:

Description Jurij Smakov 2010-04-11 18:12:59 UTC
Hi,

ulog_packet_msg is the struct (defined in ipt_ULOG.h) which determines the format of the data passed by kernel to ulogd via netlink socket whenever ULOG iptables target is triggered. The problem is that the fields are defined using data types, like long and size_t, which are not guaranteed to have the same storage size in kernel- and userspace (for example, they will be different if kernel is 64-bit, but userspace is 32-bit). Other similar data structures defined in ipt_*.h header files use types with explicit storage size, like uint32_t, etc, and it would be nice if the same would be done for ULOG.

Thanks.
Comment 1 Patrick McHardy 2010-04-13 09:34:26 UTC
We can't change this without breaking backwards compatibility. ULOG is obsoleted by nfnetlink_log, so we won't fix this. IIRC ulogd also includes a hack to work properly in a mixed 32/64 bit environment.