Em 16-05-2014 16:45, Kenneth Westerback escreveu:
> On 16 May 2014 15:00, Giancarlo Razzolini <[email protected]> wrote:
>> Hi,
>>
>>     I was configuring one new interface in one of my new machines, and I
>> disabled ipv6 with -inet6 as I always do. But I handcrafted the
>> hostname.if file and forgot to put a NONE in the broadcast address. This
>> caused the ifconfig to segfault when called from the /etc/netstart
>> script. For example:
>>
>> /etc/hostname.if:
>> inet 1.2.3.4 255.255.255.0 -inet6
>>
>> result: ifconfig segfault.
>>
>> /etc/hostname.if:
>> inet 1.2.4.5 255.255.255.0 NONE -inet6
>>
>> result: everything work as usual.
>>
>>        I am using 5.5 stable. Can't post the dmesg right now, but will
>> do this night. I will also take a look at the core dump, see if I can
>> pinpoint where are the bits responsible for the segfault.
>>
>> Cheers,
>>
>> --
>> Giancarlo Razzolini
>> GPG: 4096R/77B981BC
>>
> Did a quick test on amd64 -current using run0, and got 'bad value: -inet6'.
>
> .... Ken
As I mentioned, I'm running 5.5 stable. So this might got fixed in
current, I'm taking a look at the CVS commits right now to see if it was
fixed. But, funny thing, I've managed to get another segmentation fault,
this time from command line. While trying to replicate the bug in
another machine, I've wrongly typed:

ifconfig em4 -inet

Instead of:

ifconfig em4 -inet6

The first command also caused a segfault. As promised, follows a dmesg
of one of the machines where I reproduced this segfault:

OpenBSD 5.5 (GENERIC) #0: Fri Apr 25 13:07:59 CEST 2014
   
[email protected]:/binpatchng/work-binpatch55-amd64/src/sys/arch/amd64/compile/GENERIC
real mem = 520085504 (495MB)
avail mem = 497729536 (474MB)
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xf09f0 (10 entries)
bios0: vendor Bochs version "Bochs" date 01/01/2011
bios0: QEMU Standard PC (i440FX + PIIX, 1996)
acpi0 at bios0: rev 0
acpi0: sleep states S3 S4 S5
acpi0: tables DSDT FACP SSDT APIC HPET
acpi0: wakeup devices
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
acpihpet0 at acpi0: 100000000 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpicpu0 at acpi0
mpbios at bios0 not configured
cpu0 at mainbus0: (uniprocessor)
cpu0: QEMU Virtual CPU version 2.0.0, 2813.47 MHz
cpu0:
FPU,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SSE3,CX16,x2APIC,POPCNT,NXE,LONG,LAHF,SVM,ABM,SSE4A
cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB
64b/line 16-way L2 cache
cpu0: ITLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped
cpu0: DTLB 255 4KB entries direct-mapped, 255 4MB entries direct-mapped
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel 82441FX" rev 0x02
pcib0 at pci0 dev 1 function 0 "Intel 82371SB ISA" rev 0x00
pciide0 at pci0 dev 1 function 1 "Intel 82371SB IDE" rev 0x00: DMA,
channel 0 wired to compatibility, channel 1 wired to compatibility
wd0 at pciide0 channel 0 drive 0: <QEMU HARDDISK>
wd0: 16-sector PIO, LBA48, 30720MB, 62914560 sectors
wd0(pciide0:0:0): using PIO mode 4, DMA mode 2
atapiscsi0 at pciide0 channel 1 drive 0
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: <QEMU, QEMU DVD-ROM, 2.0.> ATAPI 5/cdrom
removable
cd0(pciide0:1:0): using PIO mode 4, DMA mode 2
uhci0 at pci0 dev 1 function 2 "Intel 82371SB USB" rev 0x01: irq 11
piixpm0 at pci0 dev 1 function 3 "Intel 82371AB Power" rev 0x03: irq 9
iic0 at piixpm0
vga1 at pci0 dev 2 function 0 "Cirrus Logic CL-GD5446" rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
virtio0 at pci0 dev 3 function 0 "Qumranet Virtio Network" rev 0x00:
Virtio Network Device
vio0 at virtio0: address 52:54:00:ab:f7:d6
virtio0: irq 11
virtio1 at pci0 dev 4 function 0 "Qumranet Virtio Memory" rev 0x00:
Virtio Memory Balloon Device
viomb0 at virtio1
virtio1: irq 11
virtio2 at pci0 dev 5 function 0 "Qumranet Virtio Network" rev 0x00:
Virtio Network Device
vio1 at virtio2: address 52:54:00:4f:65:af
virtio2: irq 10
virtio3 at pci0 dev 6 function 0 "Qumranet Virtio Network" rev 0x00:
Virtio Network Device
vio2 at virtio3: address 52:54:00:42:d8:ff
virtio3: irq 10
isa0 at pcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
fd0 at fdc0 drive 1: density unknown
usb0 at uhci0: USB revision 1.0
uhub0 at usb0 "Intel UHCI root hub" rev 1.00/1.00 addr 1
nvram: invalid checksum
vscsi0 at root
scsibus1 at vscsi0: 256 targets
softraid0 at root
scsibus2 at softraid0: 256 targets
root on wd0a (ae6577d8240a3c26.a) swap on wd0b dump on wd0b
clock: unknown CMOS layout

This one is my test machine, and yes, it's virtualized. But I reproduced
it in an OpenBSD installed directly on physical hardware too. I imagine
this segfault would happen on any installation, either it be on real
hardware or virtualized, but I've tested on both anyway.

Cheers,

-- 
Giancarlo Razzolini
GPG: 4096R/77B981BC

Reply via email to