system/6601
The following reply was made to PR system/6601; it has been noted by GNATS. From: Mike Belopuhov m...@crypt.org.ru To: gn...@openbsd.org Cc: Subject: system/6601 Date: Thu, 9 Jun 2011 17:23:02 +0200 The problem is that BN_bn2bin skips leading zeroes when it converts a bignum to the char array and we have to prepend zeroes ourselves. Otherwise peers will compute different DH keys. The following diff seems to fix an issue. I've been running a tunnel for three days and got 0% ping loss, Pawel has similar results. Index: dh.c === RCS file: /home/cvs/src/sbin/isakmpd/dh.c,v retrieving revision 1.13 diff -u -p -u -p -r1.13 dh.c --- dh.c 29 Nov 2010 22:49:26 - 1.13 +++ dh.c 7 Jun 2011 15:13:13 - @@ -402,12 +402,22 @@ int modp_create_exchange(struct group *group, u_int8_t *buf) { DH *dh = group-dh; + int len, ret; if (!DH_generate_key(dh)) return (-1); - if (!BN_bn2bin(dh-pub_key, buf)) + ret = BN_bn2bin(dh-pub_key, buf); + if (!ret) return (-1); + len = dh_getlen(group); + + /* add zero padding */ + if (ret len) { + bcopy(buf, buf + (len - ret), ret); + bzero(buf, len - ret); + } + return (0); } @@ -415,15 +425,23 @@ int modp_create_shared(struct group *group, u_int8_t *secret, u_int8_t *exchange) { BIGNUM *ex; - int ret; + int len, ret; - if ((ex = BN_bin2bn(exchange, dh_getlen(group), NULL)) == NULL) + len = dh_getlen(group); + + if ((ex = BN_bin2bn(exchange, len, NULL)) == NULL) return (-1); ret = DH_compute_key(secret, ex, group-dh); BN_clear_free(ex); if (!ret) return (-1); + + /* add zero padding */ + if (ret len) { + bcopy(secret, secret + (len - ret), ret); + bzero(secret, len - ret); + } return (0); }
Re: system/6601
Synopsis: [isakmpd] IPSEC SA is established with different keys key_authkey and key_encrypt on both peers. The problem repeats every few days. Responsible-Changed-From-To: bugs-mikeb Responsible-Changed-By: mikeb Responsible-Changed-When: Thu Jun 9 09:43:09 MDT 2011 Responsible-Changed-Why: take it
unrtf segmentation fault
OS OpenBSD 4.9 upgraded from 4.8 Command 'unrtf file.rtf' give me segmentation fault. File seem regular because it can be converted on linux.
Re: kernel/6615: Latest snapshot not mounting root device
The following reply was made to PR kernel/6615; it has been noted by GNATS. From: Laurence Tratt lau...@tratt.net To: gn...@openbsd.org Cc: Joel Sing j...@sing.id.au Subject: Re: kernel/6615: Latest snapshot not mounting root device Date: Thu, 9 Jun 2011 17:32:09 +0100 Following a message on a related subject on misc@, I've now narrowed this problem down to v1.104 of ataascsi.c: http://www.openbsd.org/cgi-bin/cvsweb/src/sys/dev/ata/atascsi.c.diff?r1=1.103;r2=1.104 Reversing this patch (I had to do it by hand as the file's diverged too much for patch) causes my machine to boot again. Laurie
kernel/6631: DDB during boot on Dell Dimension E521
Number: 6631 Category: kernel Synopsis: Upgraded to a new snapshot, machine now DDBs during boot Confidential: yes Severity: serious Priority: medium Responsible:bugs State: open Quarter: Keywords: Date-Required: Class: sw-bug Submitter-Id: unknown Arrival-Date: Thu Jun 09 19:00:01 GMT 2011 Closed-Date: Last-Modified: Originator: Release: Organization: Environment: System : OpenBSD 4.9 Details : OpenBSD 4.9-current (GENERIC.MP) #101: Wed Jun 8 18:18:14 MDT 2011 dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP Architecture: OpenBSD.amd64 OpenBSD.i386 Machine : amd64 i386 Description: Included is a dmesg from the last kernel that booted succesfully. bsd.rd from Jun 8 seems to boot correctly. On boot I get a DDB with these kernels, GENERIC, GENERIC.MP, amd64, i386. These all fail with the same messages OpenBSD 4.9-current (GENERIC.MP) #39: Tue May 31 00:15:33 MDT 2011 dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP OpenBSD 4.9-current (GENERIC.MP) #97: Mon Jun 6 15:58:51 MDT 2011 dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP OpenBSD 4.9-current (GENERIC.MP) #101: Wed Jun 8 18:18:14 MDT 2011 dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP OpenBSD 4.9-current (GENERIC) #37: Wed Jun 8 18:12:03 MDT 2011 dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC OpenBSD 4.9-current (GENERIC.MP) #65: Mon Jun 6 14:30:48 MDT 2011 dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP This is copied by hand, so it should be close, but I probably typo's something. cpu0: PowerNow! K8 2004 MHz: speeds: 2000 1800 1000 MHz pci0 at mainbus0 bus 0 panic: pci_get_capability Stopped at Debugger+0x5:leave Debugger() at Debugger+0x05 panic() at panic+0xe4 pci_get_capability() at pci_get_capability+0xa3 pci_get_ht_capability() at pci_get_ht_capability+0x30 pci_probe_device() at pci_probe_device+0x1c7 pci_enumerate_bus() at pci_enumerate_bus+0xe9 pciattach() at pciattach+0xda config_attach() at config_attach+0x1ac mainbus_attach() at mainbus_attach+0x153 config_attach() at config_attach+0x1ac end trace from: 0x80e90, count: 0 RUN AT LEAST ... ddb{0} ps PID PPID PGRP UID S FLAGS WAIT COMMAND *0 -10 0 7 0x80200 swapper ddb{0} trace Debugger() at Debugger+0x05 panic() at panic+0xe4 pci_get_capability() at pci_get_capability+0xa3 pci_get_ht_capability() at pci_get_ht_capability+0x30 pci_probe_device() at pci_probe_device+0x1c7 pci_enumerate_bus() at pci_enumerate_bus+0xe9 pciattach() at pciattach+0xda config_attach() at config_attach+0x1ac mainbus_attach() at mainbus_attach+0x153 config_attach() at config_attach+0x1ac cpu_configure() at cpu_configure+0x17 main() at main+0x405 end trace from: 0x0, count: -12 ddb{0} mach ddbcpu 1 nothing, just locked solid How-To-Repeat: Install a snapshot on a Dimension E521 and reboot. Fix: unknown dmesg: OpenBSD 4.9-current (GENERIC.MP) #97: Mon Jun 6 15:58:51 MDT 2011 dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP real mem = 1071513600 (1021MB) avail mem = 1028911104 (981MB) mainbus0 at root bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xf (63 entries) bios0: vendor Dell Inc version 1.1.4 date 12/09/2006 bios0: Dell Inc Dimension E521 acpi0 at bios0: rev 0 OpenBSD 4.9-current (GENERIC.MP) #106: Sun May 1 18:51:16 MDT 2011 t...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP real mem = 1071513600 (1021MB) avail mem = 1028935680 (981MB) mainbus0 at root bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xf (63 entries) bios0: vendor Dell Inc version 1.1.4 date 12/09/2006 bios0: Dell Inc Dimension E521 acpi0 at bios0: rev 0 acpi0: sleep states S0 S1 S3 S4 S5 acpi0: tables DSDT FACP BOOT SSDT HPET MCFG SLIC APIC acpi0: wakeup devices HUB0(S5) XVRA(S5) XVRB(S5) XVRC(S5) USB0(S3) USB2(S3) AZAD(S5) MMAC(S5) MMCI(S5) acpitimer0 at acpi0: 3579545 Hz, 24 bits acpihpet0 at acpi0: 2500 Hz acpimcfg0 at acpi0 addr 0xf000, bus 0-63 acpimadt0 at acpi0 addr 0xfee0: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: AMD Athlon(tm) 64 X2 Dual Core Processor 3800+, 2004.48 MHz cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,CX16,NXE,MMXX,FFXSR,LONG,3DNOW2,3DNOW cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line 16-way L2 cache cpu0: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative cpu0: DTLB 32 4KB entries fully associative, 8 4MB entries fully associative cpu0: apic clock running at 200MHz cpu1 at mainbus0: apid 1 (application processor) cpu1: AMD Athlon(tm) 64 X2 Dual Core Processor 3800+, 2004.18 MHz cpu1:
Re: kernel/6631: DDB during boot on Dell Dimension E521
Can you send me pcidump -vxx output for that machine?
Re: kernel/6631: DDB during boot on Dell Dimension E521
The following reply was made to PR kernel/6631; it has been noted by GNATS. From: Andrew Fresh and...@afresh1.com To: Mark Kettenis mark.kette...@xs4all.nl Cc: gn...@openbsd.org Subject: Re: kernel/6631: DDB during boot on Dell Dimension E521 Date: Thu, 9 Jun 2011 12:50:55 -0700 On Thu, Jun 09, 2011 at 09:26:04PM +0200, Mark Kettenis wrote: Can you send me pcidump -vxx output for that machine? Sure can. l8rZ, -- andrew - http://afresh1.com I think I understand, but my stubborn brain refuses to admit it until I beat it into submission by proof upon proof. -- Michael Shiloh michaelshiloh1...@gmail.com Domain /dev/pci0: 0:0:0: NVIDIA C51 Host 0x: Vendor ID: 10de Product ID: 02f0 0x0004: Command: 0006 Status ID: 00b0 0x0008: Class: 05 Subclass: 00 Interface: 00 Revision: a2 0x000c: BIST: 00 Header Type: 80 Latency Timer: 00 Cache Line Size: 00 0x0010: BAR empty () 0x0014: BAR empty () 0x0018: BAR empty () 0x001c: BAR empty () 0x0020: BAR empty () 0x0024: BAR empty () 0x0028: Cardbus CIS: 0x002c: Subsystem Vendor ID: 10de Product ID: 02f0 0x0030: Expansion ROM Base Address: 0x0038: 0x003c: Interrupt Pin: 00 Line: ff Min Gnt: 00 Max Lat: 00 0x0044: Capability 0x08: AMD LDT/HT 0x00e0: Capability 0x08: AMD LDT/HT 0x: 02f010de 00b6 05a2 0080 0x0010: 0x0020: 02f010de 0x0030: 0044 00ff 0x0040: 02f010de 01e0e008 0022 00112022 0x0050: 807f0623 807f0503 0003 0x0060: 00053606 0x0070: 0041 09d0 0011 0088 0x0080: 00889923 0c64001f 0003 007f 0x0090: a078 0x00a0: 0x00b0: 01010101 0x00c0: 0061 0x00d0: 0x00e0: a808 fee0 1000 0x00f0: 0:0:1: NVIDIA C51 Memory 0x: Vendor ID: 10de Product ID: 02fa 0x0004: Command: 0100 Status ID: 4020 0x0008: Class: 05 Subclass: 00 Interface: 00 Revision: a2 0x000c: BIST: 00 Header Type: 80 Latency Timer: 00 Cache Line Size: 00 0x0010: BAR empty () 0x0014: BAR empty () 0x0018: BAR empty () 0x001c: BAR empty () 0x0020: BAR empty () 0x0024: BAR empty () 0x0028: Cardbus CIS: 0x002c: Subsystem Vendor ID: 10de Product ID: 02fa 0x0030: Expansion ROM Base Address: 0x0038: 0x003c: Interrupt Pin: 00 Line: 00 Min Gnt: 00 Max Lat: 00 0x: 02fa10de 40200100 05a2 0080 0x0010: 0x0020: 02fa10de 0x0030: 0x0040: 0x0050: 0010 00142121 0003 0x0060: 02138821 1fe18fde 104e7208 20003f02 0x0070: 0a543210 0010 00a0 0010 0x0080: 3f50 3f90 0x0090: 0x00a0: 0x00b0: 0x00c0: 0x00d0: 0001 00fdf980 0x00e0: fec9 fc00 0x00f0: 002802c7 0:0:2: NVIDIA C51 Memory 0x: Vendor ID: 10de Product ID: 02fe 0x0004: Command: Status ID: 0020 0x0008: Class: 05 Subclass: 00 Interface: 00 Revision: a2 0x000c: BIST: 00 Header Type: 80 Latency Timer: 00 Cache Line Size: 00 0x0010: BAR empty () 0x0014: BAR empty () 0x0018: BAR empty () 0x001c: BAR empty () 0x0020: BAR empty () 0x0024: BAR empty () 0x0028: Cardbus CIS: 0x002c: Subsystem Vendor ID: 10de Product ID: 02fe 0x0030: Expansion ROM Base Address: 0x0038: 0x003c: Interrupt Pin: 00 Line: 00 Min Gnt: 00 Max Lat: 00 0x: 02fe10de 0020 05a2 0080 0x0010: 0x0020: 02fe10de 0x0030: 0x0040: 02fe10de 601c1c1b 21c01c1b 0x0050: c9380036 0001 c93c003a 801c1f02 0x0060: 001c1f02 a01c1002 901c0c02 0x0070: 901c1002
Re: kernel/6631: DDB during boot on Dell Dimension E521
The following reply was made to PR kernel/6631; it has been noted by GNATS. From: Mark Kettenis mark.kette...@xs4all.nl To: and...@afresh1.com Cc: gn...@openbsd.org Subject: Re: kernel/6631: DDB during boot on Dell Dimension E521 Date: Thu, 9 Jun 2011 23:13:09 +0200 (CEST) Date: Thu, 9 Jun 2011 12:50:55 -0700 From: Andrew Fresh and...@afresh1.com On Thu, Jun 09, 2011 at 09:26:04PM +0200, Mark Kettenis wrote: Can you send me pcidump -vxx output for that machine? Sure can. 0:0:5: NVIDIA C51 Memory 0x: Vendor ID: 10de Product ID: 02ff 0x0004: Command: 0006 Status ID: 00b0 0x0008: Class: 05 Subclass: 00 Interface: 00 Revision: a2 0x000c: BIST: 00 Header Type: 80 Latency Timer: 00 Cache Line Size: 00 0x0010: BAR empty () 0x0014: BAR empty () 0x0018: BAR empty () 0x001c: BAR empty () 0x0020: BAR empty () 0x0024: BAR empty () 0x0028: Cardbus CIS: 0x002c: Subsystem Vendor ID: 10de Product ID: 02ff 0x0030: Expansion ROM Base Address: 0x0038: 0x003c: Interrupt Pin: 00 Line: ff Min Gnt: 00 Max Lat: 00 0x0044: Capability 0x00: Reserved 0x: 02ff10de 00b6 05a2 0080 0x0010: 0x0020: 02ff10de 0x0030: 0044 00ff 0x0040: 0017 00fefe00 00fefe00 00fefe00 That PCI device has a broken Capabilities List. Can you try the diff below? Index: pci.c === RCS file: /cvs/src/sys/dev/pci/pci.c,v retrieving revision 1.92 diff -u -p -r1.92 pci.c --- pci.c 30 May 2011 19:09:46 - 1.92 +++ pci.c 9 Jun 2011 21:10:22 - @@ -564,10 +564,13 @@ pci_get_capability(pci_chipset_tag_t pc, ofs = PCI_CAPLIST_PTR(pci_conf_read(pc, tag, ofs)); while (ofs != 0) { -#ifdef DIAGNOSTIC + /* + * Some devices, like parts of the NVIDIA C51 chipset, + * have a broken Capabilities List. So we need to do + * a sanity check here. + */ if ((ofs 3) || (ofs 0x40)) - panic(pci_get_capability); -#endif + return (0); reg = pci_conf_read(pc, tag, ofs); if (PCI_CAPLIST_CAP(reg) == capid) { if (offset)
Re: kernel/6631: DDB during boot on Dell Dimension E521
The following reply was made to PR kernel/6631; it has been noted by GNATS. From: Andrew Fresh and...@afresh1.com To: Mark Kettenis mark.kette...@xs4all.nl Cc: gn...@openbsd.org Subject: Re: kernel/6631: DDB during boot on Dell Dimension E521 Date: Thu, 9 Jun 2011 16:33:30 -0700 On Thu, Jun 09, 2011 at 03:25:01PM -0600, Mark Kettenis wrote: From: Andrew Fresh and...@afresh1.com 0:0:5: NVIDIA C51 Memory 0x: Vendor ID: 10de Product ID: 02ff 0x0004: Command: 0006 Status ID: 00b0 0x0008: Class: 05 Subclass: 00 Interface: 00 Revision: a2 0x000c: BIST: 00 Header Type: 80 Latency Timer: 00 Cache Line Size: 00 0x0010: BAR empty () 0x0014: BAR empty () 0x0018: BAR empty () 0x001c: BAR empty () 0x0020: BAR empty () 0x0024: BAR empty () 0x0028: Cardbus CIS: 0x002c: Subsystem Vendor ID: 10de Product ID: 02ff 0x0030: Expansion ROM Base Address: 0x0038: 0x003c: Interrupt Pin: 00 Line: ff Min Gnt: 00 Max Lat: 00 0x0044: Capability 0x00: Reserved 0x: 02ff10de 00b6 05a2 0080 0x0010: 0x0020: 02ff10de 0x0030: 0044 00ff 0x0040: 0017 00fefe00 00fefe00 00fefe00 That PCI device has a broken Capabilities List. Can you try the diff below? Index: pci.c === RCS file: /cvs/src/sys/dev/pci/pci.c,v retrieving revision 1.92 diff -u -p -r1.92 pci.c --- pci.c 30 May 2011 19:09:46 - 1.92 +++ pci.c 9 Jun 2011 21:10:22 - @@ -564,10 +564,13 @@ pci_get_capability(pci_chipset_tag_t pc, ofs = PCI_CAPLIST_PTR(pci_conf_read(pc, tag, ofs)); while (ofs != 0) { -#ifdef DIAGNOSTIC + /* +* Some devices, like parts of the NVIDIA C51 chipset, +* have a broken Capabilities List. So we need to do +* a sanity check here. +*/ if ((ofs 3) || (ofs 0x40)) - panic(pci_get_capability); -#endif + return (0); reg = pci_conf_read(pc, tag, ofs); if (PCI_CAPLIST_CAP(reg) == capid) { if (offset) I did and the machine now boots! Hurray and thank you! Anything else to try? (now to figure out why I can no longer type into X apps) l8rZ, -- andrew - http://afresh1.com Real programmers don't document. If it was hard to write, it should be hard to understand. OpenBSD 4.9-current (GENERIC.MP) #0: Thu Jun 9 16:07:21 MST 2011 and...@rrlhcwks1001.home.hewus.com:/usr/src/sys/arch/amd64/compile/GENERIC.MP real mem = 1071513600 (1021MB) avail mem = 1028919296 (981MB) mainbus0 at root bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xf (63 entries) bios0: vendor Dell Inc version 1.1.11 date 08/02/2007 bios0: Dell Inc Dimension E521 acpi0 at bios0: rev 0 acpi0: sleep states S0 S1 S3 S4 S5 acpi0: tables DSDT FACP BOOT SSDT HPET MCFG SLIC APIC acpi0: wakeup devices HUB0(S5) XVRA(S5) XVRB(S5) XVRC(S5) USB0(S3) USB2(S3) AZAD(S5) MMAC(S5) MMCI(S5) acpitimer0 at acpi0: 3579545 Hz, 24 bits acpihpet0 at acpi0: 2500 Hz acpimcfg0 at acpi0 addr 0xf000, bus 0-63 acpimadt0 at acpi0 addr 0xfee0: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: AMD Athlon(tm) 64 X2 Dual Core Processor 3800+, 2004.48 MHz cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,CX16,NXE,MMXX,FFXSR,LONG,3DNOW2,3DNOW cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line 16-way L2 cache cpu0: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative cpu0: DTLB 32 4KB entries fully associative, 8 4MB entries fully associative cpu0: apic clock running at 200MHz cpu1 at mainbus0: apid 1 (application processor) cpu1: AMD Athlon(tm) 64 X2 Dual Core Processor 3800+, 2004.18 MHz cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,CX16,NXE,MMXX,FFXSR,LONG,3DNOW2,3DNOW cpu1: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line 16-way L2 cache cpu1: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative cpu1: DTLB 32 4KB entries fully associative, 8 4MB entries fully associative ioapic0 at mainbus0: apid 2 pa 0xfec0, version 11, 24 pins ioapic0: misconfigured as apic 0, remapped to apid 2 acpiprt0 at acpi0: bus 0 (PCI0) acpiprt1 at acpi0: bus 4 (HUB0) acpicpu0 at acpi0: PSS acpicpu1 at acpi0: PSS acpibtn0 at acpi0: PWRB cpu0: PowerNow! K8 2004 MHz: speeds: 2000 1800 1000 MHz pci0 at mainbus0 bus 0 NVIDIA C51 Host rev 0xa2 at pci0 dev 0 function 0 not configured NVIDIA C51 Memory rev 0xa2 at pci0 dev