Page 1 of 1

grsecurity-1.9.13 (2.4.23 and 2.4.24) does not compile

PostPosted: Fri Jan 23, 2004 9:50 am
by cyco
Code: Select all
netsyms.c:614: error: redefinition of `__kstrtab_tcp_v4_lookup_listener'
netsyms.c:329: error: `__kstrtab_tcp_v4_lookup_listener' previously defined here
netsyms.c:614: error: redefinition of `__ksymtab_tcp_v4_lookup_listener'
netsyms.c:329: error: `__ksymtab_tcp_v4_lookup_listener' previously defined here
{standard input}: Assembler messages:
{standard input}:5029: Error: symbol `__kstrtab_tcp_v4_lookup_listener' is already defined
{standard input}:5036: Error: symbol `__ksymtab_tcp_v4_lookup_listener' is already defined
make[2]: *** [netsyms.o] Error 1
make[2]: *** [netsyms.o] Error 1
make[2]: Leaving directory `/usr/src/linux-2.4.23/net'


This happens with Patch for vanilla 2.4.23 and 2.4.24 on a GNU/Debian sarge Box. :(

Any hints. Thanks for you help.

With best regards, Jan.

PostPosted: Fri Jan 23, 2004 10:55 am
by h4x0r
The linux 2.4.23 and 2.4.24 net/netsyms.c files I have does not have kstrtab_tcp_v4_lookup_listener in it anywhere, and grep cannot find it anywhere in the source trees, before or after, it's patched with grsecurity. Are you sure you've got a vanilla source tarball from kernel.org and that you haven't applied any other patches?

PostPosted: Fri Jan 23, 2004 11:05 am
by cyco
h4x0r wrote:The linux 2.4.23 and 2.4.24 net/netsyms.c files I have does not have kstrtab_tcp_v4_lookup_listener in it anywhere, and grep cannot find it anywhere in the source trees, before or after, it's patched with grsecurity. Are you sure you've got a vanilla source tarball from kernel.org and that you haven't applied any other patches?


Code: Select all
mordor:/usr/src# rgrep "__ksymtab_tcp_v4_lookup_listener" linux
mordor:/usr/src# grep "__ksymtab_tcp_v4_lookup_listener" grsecurity-1.9.13-2.4.24.patch
mordor:/usr/src# grep "__ksymtab_tcp_v4_lookup_listener" 50_config.gz-2.4.24-grsec-1.9.13


until here I cant find anything now .. hmmm ... lets look deeper into it.

what its confusing me .. the vanilla kernel with the same .config is compiling .. wth patch not

regards, jan.

Re: grsecurity-1.9.13 (2.4.23 and 2.4.24) does not compile

PostPosted: Fri Jan 23, 2004 6:07 pm
by PaX Team
cyco wrote:netsyms.c:614: error: redefinition of `__kstrtab_tcp_v4_lookup_listener'
netsyms.c:329: error: `__kstrtab_tcp_v4_lookup_listener' previously defined here
netsyms.c:614: error: redefinition of `__ksymtab_tcp_v4_lookup_listener'

the problem is this part of the grsec patch in net/netsyms.c:
Code: Select all
+#if defined(CONFIG_IP_NF_MATCH_STEALTH_MODULE)
+#if !defined (CONFIG_IPV6_MODULE) && !defined (CONFIG_KHTTPD) && !defined (CONFIG_KHTTPD_MODULE)
+EXPORT_SYMBOL(tcp_v4_lookup_listener);
+#endif
+extern struct sock *udp_v4_lookup(u32 saddr, u16 sport, u32 daddr, u16 dport, int dif);
+EXPORT_SYMBOL(udp_v4_lookup);
+#endif
the part that exports tcp_v4_lookup_listener is no longer needed (and hasn't been for some time now in fact, i wonder how noone ran into this before).

Re: grsecurity-1.9.13 (2.4.23 and 2.4.24) does not compile

PostPosted: Sat Jan 24, 2004 4:52 am
by cyco
PaX Team wrote:
cyco wrote:netsyms.c:614: error: redefinition of `__kstrtab_tcp_v4_lookup_listener'
netsyms.c:329: error: `__kstrtab_tcp_v4_lookup_listener' previously defined here
netsyms.c:614: error: redefinition of `__ksymtab_tcp_v4_lookup_listener'

the problem is this part of the grsec patch in net/netsyms.c:
Code: Select all
+#if defined(CONFIG_IP_NF_MATCH_STEALTH_MODULE)
+#if !defined (CONFIG_IPV6_MODULE) && !defined (CONFIG_KHTTPD) && !defined (CONFIG_KHTTPD_MODULE)
+EXPORT_SYMBOL(tcp_v4_lookup_listener);
+#endif
+extern struct sock *udp_v4_lookup(u32 saddr, u16 sport, u32 daddr, u16 dport, int dif);
+EXPORT_SYMBOL(udp_v4_lookup);
+#endif
the part that exports tcp_v4_lookup_listener is no longer needed (and hasn't been for some time now in fact, i wonder how noone ran into this before).


Okay .. I kicked it out and trying another run... I will post my result laters .. :)

Haa ... now its working.. maybe it has todo cause I choosed to compile IPv6 static into the kernel, which maybe not used by the most people.

Thanks and best regards, Jan.