[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#601803: kfreebsd-image-8.1-1-686: ifconfig wlan0 create wlandev ath0 => SIOCIFCREATE2: Bad address



Package: kfreebsd-image-8.1-1-686
Version: 8.1-5
Severity: normal

[ this is resend #1 since I did not receive any reply in hours
although my email works otherwise. This time the attachment is not
included. ]

ifconfig wlan0 create wlandev ath0

fails with

ifconfig: SIOCIFCREATE2: Bad address

on my aspire one laptop. I recompiled freebsd-utils with debugging
symbols and set a breakpoint at ifclone.c just before

if (ioctl(s, SIOCIFCREATE2, &ifr) < 0)

Here gdb shows the ifr as

(gdb) p ifr
$1 = {ifr_name = "wlan0\000\000\000\000\000\000\000\000\000\000", ifr_ifru = {ifru_addr = {sa_len = 0 '\000', sa_family = 0 '\000', sa_data = '\000' <repeats 13 times>}, ifru_dstaddr = {sa_len = 0 '\000', sa_family = 0 '\000', sa_data = '\000' <repeats 13 times>}, ifru_broadaddr = {sa_len = 0 '\000', sa_family = 0 '\000', sa_data = '\000' <repeats 13 times>}, ifru_netmask = {sa_len = 0 '\000', sa_family = 0 '\000', sa_data = '\000' <repeats 13 times>}, ifru_buffer = {length = 0, buffer = 0x0}, ifru_flags = {0, 0}, ifru_index = 0, ifru_jid = 0, ifru_metric = 0, ifru_mtu = 0, ifru_phys = 0, ifru_media = 0, ifru_data = 0x0, ifru_cap = {0, 0}}}
(gdb) x/100xb (char*)&ifr
0xbfbfe7bc:	0x77	0x6c	0x61	0x6e	0x30	0x00	0x00	0x00
0xbfbfe7c4:	0x00	0x00	0x00	0x00	0x00	0x00	0x00	0x00
0xbfbfe7cc:	0x00	0x00	0x00	0x00	0x00	0x00	0x00	0x00
0xbfbfe7d4:	0x00	0x00	0x00	0x00	0x00	0x00	0x00	0x00
0xbfbfe7dc:	0xb9	0xc0	0x89	0xa9	0x02	0x00	0x00	0x00
0xbfbfe7e4:	0x98	0x21	0x05	0x08	0x28	0xe8	0xbf	0xbf
0xbfbfe7ec:	0x16	0xa5	0x04	0x08	0x06	0x00	0x00	0x00
0xbfbfe7f4:	0x00	0x00	0x00	0x00	0x06	0x00	0x00	0x00
0xbfbfe7fc:	0x60	0x28	0x05	0x08	0xc0	0xff	0x08	0x28
0xbfbfe804:	0x98	0x21	0x05	0x08	0x20	0xdd	0x06	0x28
0xbfbfe80c:	0x06	0x00	0x00	0x00	0xc0	0x3f	0x05	0x08
0xbfbfe814:	0x00	0x00	0x00	0x00	0xcb	0x03	0x05	0x08
0xbfbfe81c:	0x60	0x28	0x05	0x08

I then recompiled kfreebsd-8 with debugging symbols and DDB/KDB
support (and documented this as
http://wiki.debian.org/Debian_GNU/kFreeBSD_FAQ#Q.HowdoIdebugthekernel.3F
) and saw that copyin() in wlan_clone_create() fails since its third
argument, caddr_t params, contains just 0x10 which can not be a valid
pointer.

"trace" shows that the third argument of ifioctl is 0xc32477e0 so I
dumped its contents with the kernel debugger. Unfortunately I do not
know how to save debugger output to a file so I took a photo of the
screen instead (see the attached 41KB png file).




-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: kfreebsd-i386 (i686)

Kernel: kFreeBSD 8.1-1-686
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash

Versions of packages kfreebsd-image-8.1-1-686 depends on:
ii  freebsd-utils                 8.1-2+b1   FreeBSD utilities needed for GNU/k
ii  kldutils                      8.1-2+b1   tools for managing kFreeBSD module

Versions of packages kfreebsd-image-8.1-1-686 recommends:
pn  libc0.1-i686                  <none>     (no description available)

kfreebsd-image-8.1-1-686 suggests no packages.

-- no debconf information



Reply to: