Martin Buck | 8 Jul 18:50 2004
Picon

Busybox insmod crashes when loading module with debug info

Hi,

I noticed that the insmod in busybox (1.00-pre10) segfaults when I try to
load a module containing debug information on MIPS.

The segfault happens during relocation in arch_apply_relocation(). I added
a few debug messages to see what's going on. This is just before the
segfault occurs:

arch_apply_relocation: type: 2
sym->name: .debug_info, targsec->name: .debug_aranges, symsec->name: .symtab
targsec->contents: 0x0

type 2 is R_MIPS_32. The code handling it simply does "*loc += v" and loc
is targsec->contents plus an offset. With targsec->contents being a NULL
pointer, it's not surprising that this crashes.

I don't know too much about ELF and module loading, so I don't know what
the right fix for this is. But I guess insmod should completely ignore
debug information.

Martin
_______________________________________________
busybox mailing list
busybox <at> mail.busybox.net
http://codepoet.org/mailman/listinfo/busybox

Gmane