Page 1 of 1

oops 2.6.14.5 + grsecurity while loading modules

PostPosted: Wed Jan 04, 2006 1:34 pm
by Raf256
On 2.6.14.5 + grsecurity on amd64 in 32b mode debian unstable I get oops while booting system when modules are loaded / devices are probed/discovered.

What can it be?

Code: Select all
Detecting hardware...Discovered hardware for these modules: forcedeth 8139too sata_nv i810_audio usb_ohci ehci_hcd
oading forcedeath module...
force deathc. ... version 0.41
acpi_bus-0200 [01] bus_set_power : Device is not power manageable
ACPI: PCI interrupt link APCH enabled at irq 21
PAX: modprobe:8960, uid/eid: 0/0, attempted to modify kernel code at virtual address c08ad5c8
printing eip:
00005741
*pgd = 8001e1
*pmd = 8001e1
Oops: 0003 [#1]
PREEMPT
Modules linked in: forcedeth nls_iso8859_1 nls_cp437 ntfs psmouse
CPU: 0
EIP: 0060:[<00005741>] Not tainted VLI
EFLAGS: 00010212 (2.6.14.5-grsec-a+ga-k8reg-p4)
eax: 00603380  ebx: 000000b9  ecx: 00600000  edx: 00008e00
esi: 00000000  edi: f244ddbc  ebp: 000000011  esp: f244dd7c
ds: 007b  es: 007b  ss: 0068
Process modprobe (pid: 8960, threadinfo=f244c000 task=f788e030)
Stack: 00000000 00017c13 002a7c81 00200000 0000011b c08d400e c091fcd9 00400000
       c091cea8 c091ce1b 00000015 00000000 000000b9 00000015 000189b9 01000000
          00000011 00000011 00000000 00000015 00015a66 00000001 00000000 00000015
Call Trace:
00000000
00017c13

002a7c13
00200000
0000011b
00400000
00000015
00000000
000000b9
[...about 50 lines...]
00000073
00000246
0000007b
00000000

Code: 66 7a 02 00 83 c4 08 5b e9 ed 1d 4a 00 8d b6 00 00 00 00 8d bc 27 00 00 00
 00 b9 00 00 60 00 53 89 c3 89 c8 66 89 d0 66 ba 00 8e <89> 04 dd 00 d0 8a c0 89

 14 dd 04 d0 8a c0 5b c3 90 90 90 90 90
/etc/rcS.d/S36discover: line 171:  8960 Segmentatiion fault   modprobe $MODULE
Loading 8139too module....
<6>8139too Fast Ethernet driver 0.9.27


Other two crashes (when I set grsecurity to enable itself LATER then normally throught echo 1 > /proc/sys/kernel/grsecurity/... but perhaps that was irrevelant)

Code: Select all
...cuted here - end of scroll back in terminal...
00000073
00000206
0000007b
0000007b <hmm, perhaps it was twice, this address, in first dump as well>
00000000
[...]
Code: [same as before]
/etc/rcS.d/S36discover: line 171:  2192 Segmentatiion fault   modprobe $MODULE
* 8139too disabled in cofiguration
* skipping unavailable/builtin sata_nv module.
[...]

YET, after the oops linux try to continue to boot:

Loading ohci_hdc module...
<6>usbcore: registered new driver usbfs
usbcore: registered new driver hub
ohci_hcd: 2005 April 22 USB 1.1 ...
ohci_hcd: block sizes: ed 64 td 64
acpi_bus-0200 [01] bus_set_power : Device is not power manageable
ACPI: PCI interrupt link APCH enabled at irq 21
PAX: modprobe:8960, uid/eid: 0/0, attempted to modify kernel code at virtual address c08ad608<this address is simmilar to 1st dump but a bit different>
printing eip:
00005741
*pgd = 8001e1 <same as in 1st dump>
*pmd = 8001e1
Oops: 0003 [#2]
PREEMPT
Modules linked in: ohci_hcd usbcore forcedeth nls_iso8859_1 nls_cp437 ntfs psmouse
CPU: 0
EIP: 0060:[<00005741>] Not tainted VLI
EFLAGS: 00010212 (2.6.14.5-grsec-a+ga-k8reg-p4)
eax: 00603390  ebx: 000000c1  ecx: 00600000  edx: 00008e00
[...and so on...]


System works fine on 2.6.14.3 + grsecurity with simmilar settings
(I just enabled some extra drivers)
diff ot the configs:

root@lore:/usr/src/kernel/2.6.14.3+grsec/linux-2.6.14.3# diff -Nuar .config ../../2.6.14.5+grsec/linux-2.6.14.5/.config | egrep "^\+" > ~/1.diff

Code: Select all
+++ ../../2.6.14.5+grsec/linux-2.6.14.5/.config   2006-01-04 07:17:57.000000000 +0100
+# Linux kernel version: 2.6.14.5-grsec
+# Wed Jan  4 07:17:57 2006
+CONFIG_LOCALVERSION="-a+ga-k8reg-pg4"
+CONFIG_X86_UP_APIC=y
+CONFIG_X86_UP_IOAPIC=y
+CONFIG_X86_LOCAL_APIC=y
+CONFIG_X86_IO_APIC=y
+# CONFIG_X86_MCE_P4THERMAL is not set
+CONFIG_APM=m
+# CONFIG_APM_IGNORE_USER_SUSPEND is not set
+# CONFIG_APM_DO_ENABLE is not set
+CONFIG_APM_CPU_IDLE=y
+# CONFIG_APM_DISPLAY_BLANK is not set
+# CONFIG_APM_RTC_IS_GMT is not set
+# CONFIG_APM_ALLOW_INTS is not set
+CONFIG_APM_REAL_MODE_POWER_OFF=y
+# CONFIG_PCI_MSI is not set
+CONFIG_IEEE80211=m
+CONFIG_IEEE80211_DEBUG=y
+CONFIG_IEEE80211_CRYPT_WEP=m
+CONFIG_IEEE80211_CRYPT_CCMP=m
+CONFIG_IEEE80211_CRYPT_TKIP=m
+CONFIG_MTD_AMD76XROM=m
+CONFIG_MTD_ICHXROM=m
+CONFIG_MTD_SCB2_FLASH=m
+CONFIG_MTD_L440GX=m
+CONFIG_MTD_PCMCIA=m
+# CONFIG_MTD_PCMCIA_ANONYMOUS is not set
+CONFIG_MTD_PLATRAM=m
+CONFIG_PARIDE_BPCK=m
+CONFIG_PARIDE_BPCK6=m
+CONFIG_ATA_OVER_ETH=m
+CONFIG_PDC202XX_BURST=y
+# CONFIG_IPW2200 is not set
+CONFIG_ISDN=m
+
+#
+# Old ISDN4Linux
+#
+# CONFIG_ISDN_I4L is not set
+
+#
+# CAPI subsystem
+#
+CONFIG_ISDN_CAPI=m
+CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
+# CONFIG_ISDN_CAPI_MIDDLEWARE is not set
+# CONFIG_ISDN_CAPI_CAPI20 is not set
+
+#
+# CAPI hardware drivers
+#
+
+#
+# Active AVM cards
+#
+CONFIG_CAPI_AVM=y
+# CONFIG_ISDN_DRV_AVMB1_B1PCI is not set
+# CONFIG_ISDN_DRV_AVMB1_B1PCMCIA is not set
+# CONFIG_ISDN_DRV_AVMB1_T1PCI is not set
+# CONFIG_ISDN_DRV_AVMB1_C4 is not set
+
+#
+# Active Eicon DIVA Server cards
+#
+CONFIG_CAPI_EICON=y
+CONFIG_ISDN_DIVAS=m
+# CONFIG_ISDN_DIVAS_BRIPCI is not set
+# CONFIG_ISDN_DIVAS_PRIPCI is not set
+CONFIG_ISDN_DIVAS_DIVACAPI=m
+# CONFIG_ISDN_DIVAS_USERIDI is not set
+# CONFIG_ISDN_DIVAS_MAINT is not set
+CONFIG_PHONE_IXJ=m
+# CONFIG_PHONE_IXJ_PCMCIA is not set
+CONFIG_INPUT_JOYSTICK=y
+CONFIG_JOYSTICK_ANALOG=m
+# CONFIG_JOYSTICK_A3D is not set
+# CONFIG_JOYSTICK_ADI is not set
+# CONFIG_JOYSTICK_COBRA is not set
+# CONFIG_JOYSTICK_GF2K is not set
+# CONFIG_JOYSTICK_GRIP is not set
+# CONFIG_JOYSTICK_GRIP_MP is not set
+# CONFIG_JOYSTICK_GUILLEMOT is not set
+# CONFIG_JOYSTICK_INTERACT is not set
+# CONFIG_JOYSTICK_SIDEWINDER is not set
+# CONFIG_JOYSTICK_TMDC is not set
+# CONFIG_JOYSTICK_IFORCE is not set
+# CONFIG_JOYSTICK_WARRIOR is not set
+# CONFIG_JOYSTICK_MAGELLAN is not set
+# CONFIG_JOYSTICK_SPACEORB is not set
+# CONFIG_JOYSTICK_SPACEBALL is not set
+# CONFIG_JOYSTICK_STINGER is not set
+# CONFIG_JOYSTICK_TWIDJOY is not set
+# CONFIG_JOYSTICK_DB9 is not set
+# CONFIG_JOYSTICK_GAMECON is not set
+# CONFIG_JOYSTICK_TURBOGRAFX is not set
+CONFIG_JOYSTICK_JOYDUMP=m
+CONFIG_RIO=m
+# CONFIG_RIO_OLDPCI is not set
+CONFIG_SOFT_WATCHDOG=m
+CONFIG_AGP_ALI=m
+CONFIG_AGP_ATI=m
+CONFIG_AGP_AMD=m
+CONFIG_AGP_NVIDIA=m
+CONFIG_AGP_SIS=m
+CONFIG_AGP_SWORKS=m
+CONFIG_AGP_VIA=m
+CONFIG_AGP_EFFICEON=m
+CONFIG_DRM_SAVAGE=m
+CONFIG_SYNCLINK_CS=m
+CONFIG_MAX_RAW_DEVS=512
+CONFIG_DVB=y
+CONFIG_DVB_CORE=m
+
+#
+# Supported SAA7146 based PCI Adapters
+#
+CONFIG_DVB_AV7110=m
+CONFIG_DVB_AV7110_OSD=y
+CONFIG_DVB_BUDGET=m
+CONFIG_DVB_BUDGET_CI=m
+CONFIG_DVB_BUDGET_AV=m
+CONFIG_DVB_BUDGET_PATCH=m
+
+#
+# Supported USB Adapters
+#
+CONFIG_DVB_USB=m
+CONFIG_DVB_USB_DEBUG=y
+# CONFIG_DVB_USB_A800 is not set
+# CONFIG_DVB_USB_DIBUSB_MB is not set
+# CONFIG_DVB_USB_DIBUSB_MC is not set
+# CONFIG_DVB_USB_UMT_010 is not set
+# CONFIG_DVB_USB_CXUSB is not set
+# CONFIG_DVB_USB_DIGITV is not set
+# CONFIG_DVB_USB_VP7045 is not set
+# CONFIG_DVB_USB_VP702X is not set
+# CONFIG_DVB_USB_NOVA_T_USB2 is not set
+# CONFIG_DVB_USB_DTT200U is not set
+# CONFIG_DVB_TTUSB_BUDGET is not set
+# CONFIG_DVB_TTUSB_DEC is not set
+# CONFIG_DVB_CINERGYT2 is not set
+
+#
+# Supported FlexCopII (B2C2) Adapters
+#
+CONFIG_DVB_B2C2_FLEXCOP=m
+# CONFIG_DVB_B2C2_FLEXCOP_PCI is not set
+# CONFIG_DVB_B2C2_FLEXCOP_USB is not set
+# CONFIG_DVB_B2C2_FLEXCOP_DEBUG is not set
+
+#
+# Supported BT878 Adapters
+#
+CONFIG_DVB_BT8XX=m
+
+#
+# Supported Pluto2 Adapters
+#
+CONFIG_DVB_PLUTO2=m
+
+#
+# Supported DVB Frontends
+#
+
+#
+# Customise DVB Frontends
+#
+
+#
+# DVB-S (satellite) frontends
+#
+CONFIG_DVB_STV0299=m
+CONFIG_DVB_CX24110=m
+CONFIG_DVB_TDA8083=m
+# CONFIG_DVB_TDA80XX is not set
+CONFIG_DVB_MT312=m
+CONFIG_DVB_VES1X93=m
+CONFIG_DVB_S5H1420=m
+
+#
+# DVB-T (terrestrial) frontends
+#
+CONFIG_DVB_SP8870=m
+CONFIG_DVB_SP887X=m
+# CONFIG_DVB_CX22700 is not set
+# CONFIG_DVB_CX22702 is not set
+CONFIG_DVB_L64781=m
+CONFIG_DVB_TDA1004X=m
+CONFIG_DVB_NXT6000=m
+CONFIG_DVB_MT352=m
+# CONFIG_DVB_DIB3000MB is not set
+# CONFIG_DVB_DIB3000MC is not set
+
+#
+# DVB-C (cable) frontends
+#
+# CONFIG_DVB_ATMEL_AT76C651 is not set
+CONFIG_DVB_VES1820=m
+CONFIG_DVB_TDA10021=m
+CONFIG_DVB_STV0297=m
+
+#
+# ATSC (North American/Korean Terresterial DTV) frontends
+#
+CONFIG_DVB_NXT2002=m
+CONFIG_DVB_OR51211=m
+# CONFIG_DVB_OR51132 is not set
+CONFIG_DVB_BCM3510=m
+# CONFIG_DVB_LGDT330X is not set
+CONFIG_VIDEO_SAA7146=m
+CONFIG_VIDEO_SAA7146_VV=m
+CONFIG_VIDEO_VIDEOBUF=m
+CONFIG_FB_RADEON=m
+CONFIG_FB_RADEON_I2C=y
+# CONFIG_FB_RADEON_DEBUG is not set
+CONFIG_FB_SAVAGE=m
+# CONFIG_FB_SAVAGE_I2C is not set
+# CONFIG_FB_SAVAGE_ACCEL is not set
+CONFIG_FB_SIS=m
+# CONFIG_FB_SIS_300 is not set
+# CONFIG_FB_SIS_315 is not set
+CONFIG_FB_3DFX=m
+# CONFIG_FB_3DFX_ACCEL is not set
+CONFIG_FB_VOODOO1=m
+CONFIG_FB_TRIDENT=m
+# CONFIG_FB_TRIDENT_ACCEL is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=m
+CONFIG_BACKLIGHT_DEVICE=y
+CONFIG_LCD_CLASS_DEVICE=m
+CONFIG_LCD_DEVICE=y
+CONFIG_SOUND_ES1370=m
+CONFIG_SOUND_ESSSOLO1=m
+CONFIG_SOUND_MAESTRO=m
+CONFIG_SOUND_MAESTRO3=m
+CONFIG_SOUND_SONICVIBES=m
+CONFIG_SOUND_TRIX=m
+CONFIG_SOUND_WAVEFRONT=m
+CONFIG_SOUND_MAUI=m
+CONFIG_SOUND_YM3812=m
+CONFIG_SOUND_OPL3SA1=m
+CONFIG_SOUND_OPL3SA2=m
+CONFIG_SOUND_YMFPCI=m
+# CONFIG_SOUND_YMFPCI_LEGACY is not set
+CONFIG_AEDSP16_MSS=y
+CONFIG_USB_SUSPEND=y
+CONFIG_USB_STORAGE_DEBUG=y
+CONFIG_HID_FF=y
+# CONFIG_HID_PID is not set
+# CONFIG_LOGITECH_FF is not set
+# CONFIG_THRUSTMASTER_FF is not set
+CONFIG_USB_ACECAD=m
+CONFIG_USB_KEYSPAN_REMOTE=m
+CONFIG_USB_APPLETOUCH=m
+CONFIG_USB_DABUSB=m
+CONFIG_USB_EMI62=m
+CONFIG_USB_ATM=m
+CONFIG_USB_SPEEDTOUCH=m
+CONFIG_USB_CXACRU=m
+CONFIG_USB_XUSBATM=m
+CONFIG_MMC_DEBUG=y
+CONFIG_INFINIBAND=m
+# CONFIG_INFINIBAND_USER_MAD is not set
+# CONFIG_INFINIBAND_USER_ACCESS is not set
+# CONFIG_INFINIBAND_MTHCA is not set
+# CONFIG_INFINIBAND_IPOIB is not set
+CONFIG_DETECT_SOFTLOCKUP=y
+CONFIG_SCHEDSTATS=y
+CONFIG_X86_FIND_SMP_CONFIG=y
+CONFIG_X86_MPPARSE=y
+CONFIG_GRKERNSEC_ACL_MAXTRIES=2
+CONFIG_GRKERNSEC_ACL_TIMEOUT=30
+CONFIG_CRYPTO_AES=m

PostPosted: Wed Jan 04, 2006 5:14 pm
by Raf256
Thanks to pipacs @ #grsecurity @ irc.oftc.net I got some more informations.
In case of crash look in /var/log/messages :)
Even from the not-debug-enabled-kernel it seems the symbols where partially resolved there

Code: Select all
/etc/init.d/rcS[rcS:23366] uid/euid:0/0 gid/egid:0/0
Jan  4 08:50:28 lore kernel: EXT3-fs warning: maximal mount count reached, running e2fsck is recommended
Jan  4 08:50:28 lore kernel: kjournald starting.  Commit interval 5 seconds
Jan  4 08:50:28 lore kernel: EXT3 FS on hda17, internal journal
Jan  4 08:50:28 lore kernel: EXT3-fs: mounted filesystem with ordered data mode.
Jan  4 08:50:28 lore kernel: grsec: mount of /dev/hda17 to /mnt/wine/1/c by /bin/mount[mount:27496] uid/euid:0/0 gid/egid:0/0, parent /etc/init.d/rcS[rcS:23366] uid/euid:0/0 gid/egid:0/0
Jan  4 08:50:28 lore kernel: process `syslogd' is using obsolete setsockopt SO_BSDCOMPAT
Jan  4 08:52:01 lore kernel: grsec: mount of /dev/hda12 to /usr by /bin/mount[mount:25353] uid/euid:0/0 gid/egid:0/0, parent /bin/bash[bash:2907] uid/euid:0/0 gid/egid:0/0
Jan  4 08:53:52 lore kernel: nvidia: module license 'NVIDIA' taints kernel.
Jan  4 08:53:52 lore kernel: acpi_bus-0200 [01] bus_set_power         : Device is not power manageable
Jan  4 08:53:52 lore kernel: ACPI: PCI Interrupt Link [APC5] enabled at IRQ 16
Jan  4 08:53:52 lore kernel: 00005741
Jan  4 08:53:52 lore kernel: PREEMPT
Jan  4 08:53:52 lore kernel: Modules linked in: nvidia
Jan  4 08:53:52 lore kernel: CPU:    0
Jan  4 08:53:52 lore kernel: EIP:    0060:[set_intr_gate+17/48]    Tainted: P      VLI
Jan  4 08:53:52 lore kernel: EFLAGS: 00010212   (2.6.14.5-grsec-a+ga-k8reg-pg4)
Jan  4 08:53:52 lore kernel: eax: 00603380   ebx: 000000b9   ecx: 00600000   edx: 00008e00
Jan  4 08:53:52 lore kernel: esi: 00000001   edi: f6a4fd8c   ebp: 00000011   esp: f6a4fd4c
Jan  4 08:53:52 lore kernel: ds: 007b   es: 007b   ss: 0068
Jan  4 08:53:52 lore kernel: Process insmod (pid: 20299, threadinfo=f6a4e000 task=f52eb030)
Jan  4 08:53:52 lore kernel: Stack: 00000000 00017c13 002a7c81 00200000 0000011b c08d400e c091fcd9 00400000
Jan  4 08:53:52 lore kernel:        c091cea8 c091ce1b 00000010 00000000 000000b9 00000010 0001a9b9 01000000
Jan  4 08:53:52 lore kernel:        00000011 00000011 00000000 00000010 00015a66 00000001 00000001 00000010
Jan  4 08:53:52 lore kernel: Call Trace:
Jan  4 08:53:52 lore kernel:  [_text+0/261]
Jan  4 08:53:52 lore kernel:  [io_apic_set_pci_routing+483/736]
Jan  4 08:53:53 lore kernel:  [acpi_ut_value_exit+36/46]
Jan  4 08:53:53 lore kernel:  [xfs_lock_dir_and_entry+304/320]
Jan  4 08:53:53 lore kernel:  [checkCPUtype+22/129]
Jan  4 08:53:53 lore kernel:  [phys_startup_32+0/480]
Jan  4 08:53:53 lore kernel:  [_text+16/261]
Jan  4 08:53:53 lore kernel:  [_text+0/261]
Jan  4 08:53:53 lore kernel:  [_text+185/261]
Jan  4 08:53:53 lore kernel:  [_text+16/261]
Jan  4 08:53:53 lore kernel:  [aes_enc_blk+1369/2924]
Jan  4 08:53:53 lore kernel:  [_text+17/261]
Jan  4 08:53:53 lore kernel:  [_text+17/261]
Jan  4 08:53:53 lore kernel:  [_text+0/261]
Jan  4 08:53:53 lore kernel:  [_text+16/261]
Jan  4 08:53:53 lore kernel:  [mp_register_gsi+278/464]
Jan  4 08:53:53 lore kernel:  [_text+1/261]
Jan  4 08:53:53 lore kernel:  [_text+1/261]
Jan  4 08:53:53 lore kernel:  [_text+16/261]
Jan  4 08:53:53 lore kernel:  [_text+0/261]
Jan  4 08:53:53 lore kernel:  [_text+1/261]
Jan  4 08:53:53 lore kernel:  [_text+1/261]
Jan  4 08:53:53 lore kernel:  [_text+16/261]
Jan  4 08:53:53 lore kernel:  [_text+1/261]
Jan  4 08:53:53 lore kernel:  [_text+1/261]
Jan  4 08:53:53 lore kernel:  [acpi_register_gsi+94/128]
Jan  4 08:53:53 lore kernel:  [acpi_pci_irq_enable+348/800]
Jan  4 08:53:53 lore kernel:  [_text+16/261]
Jan  4 08:53:53 lore kernel:  [acpi_pci_irq_enable+579/800]
Jan  4 08:53:53 lore kernel:  [_text+1/261]
Jan  4 08:53:53 lore kernel:  [_text+1/261]
Jan  4 08:53:53 lore kernel:  [lock_may_write+112/176]
Jan  4 08:53:53 lore kernel:  [name_to_dev_t+383/720]
Jan  4 08:53:53 lore kernel:  [pcibios_enable_device+20/32]
Jan  4 08:53:53 lore kernel:  [pci_enable_device_bars+47/80]
Jan  4 08:53:53 lore kernel:  [pci_enable_device+22/80]
Jan  4 08:53:53 lore kernel:  [_etext+3217451/-1077581902]
Jan  4 08:53:53 lore kernel:  [init+50/368]
Jan  4 08:53:53 lore kernel:  [_text+0/261]
Jan  4 08:53:53 lore last message repeated 6 times
Jan  4 08:53:53 lore kernel:  [pci_call_probe+10/16]
Jan  4 08:53:53 lore kernel:  [__pci_device_probe+70/96]
Jan  4 08:53:53 lore kernel:  [pci_device_probe+38/64]
Jan  4 08:53:53 lore kernel:  [driver_probe_device+59/208]
Jan  4 08:53:53 lore kernel:  [__driver_attach+57/64]
Jan  4 08:53:53 lore kernel:  [_text+0/261]
Jan  4 08:53:53 lore kernel:  [bus_for_each_dev+58/96]
Jan  4 08:53:53 lore kernel:  [_text+0/261]
Jan  4 08:53:53 lore kernel:  [driver_attach+22/32]
Jan  4 08:53:53 lore kernel:  [__driver_attach+0/64]
Jan  4 08:53:53 lore kernel:  [bus_add_driver+123/208]
Jan  4 08:53:53 lore kernel:  [_text+0/261]
Jan  4 08:53:53 lore kernel:  [pci_register_driver+88/128]
Jan  4 08:53:53 lore kernel:  [_text+1/261]
Jan  4 08:53:53 lore kernel:  [_etext+3487740/-1077581902]
Jan  4 08:53:53 lore kernel:  [_text+26/261]
Jan  4 08:53:53 lore kernel:  [_text+26/261]
Jan  4 08:53:53 lore kernel:  [_text+0/261]
Jan  4 08:53:53 lore last message repeated 2 times
Jan  4 08:53:53 lore kernel:  [sys_init_module+174/528]
Jan  4 08:53:53 lore kernel:  [_text+0/261]
Jan  4 08:53:53 lore last message repeated 2 times
Jan  4 08:53:53 lore kernel:  [syscall_call+7/11]
Jan  4 08:53:53 lore kernel:  [.text.lock.arp_tables+233/332]
Jan  4 08:53:53 lore kernel:  [_text+0/261]
Jan  4 08:53:53 lore kernel:  [_text+0/261]
Jan  4 08:53:53 lore kernel:  [_text+128/261]
Jan  4 08:53:53 lore kernel:  [_text+123/261]
Jan  4 08:53:53 lore kernel:  [_text+123/261]
Jan  4 08:53:53 lore kernel:  [_text+128/261]
Jan  4 08:53:53 lore kernel:  [_text+115/261]
Jan  4 08:53:53 lore kernel:  [ignore_int+6/64]
Jan  4 08:53:53 lore kernel:  [_text+123/261]
Jan  4 08:53:53 lore kernel:  [ignore_int+6/64]
Jan  4 08:53:53 lore kernel:  [_text+123/261]
Jan  4 08:53:53 lore kernel:  [_text+115/261]
Jan  4 08:53:53 lore kernel:  [ignore_int+6/64]
Jan  4 08:53:53 lore kernel:  [_text+123/261]
Jan  4 08:53:53 lore kernel:  [lookup_bdev+93/144]
Jan  4 08:53:53 lore kernel:  [_text+123/261]
Jan  4 08:53:53 lore kernel:  [_text+123/261]
Jan  4 08:53:53 lore kernel:  [_text+3/261]
Jan  4 08:53:53 lore kernel:  [_text+115/261]
Jan  4 08:53:53 lore kernel:  [ignore_int+6/64]
Jan  4 08:53:53 lore kernel:  [_text+123/261]
Jan  4 08:53:53 lore last message repeated 2 times
Jan  4 08:53:53 lore kernel:  [_text+163/261]
Jan  4 08:53:53 lore kernel:  [_text+115/261]
Jan  4 08:53:53 lore kernel:  [rest_init+6/48]
Jan  4 08:53:53 lore kernel:  [_text+123/261]
Jan  4 08:53:53 lore kernel:  [_text+115/261]
Jan  4 08:53:53 lore kernel:  [rest_init+6/48]
Jan  4 08:53:53 lore kernel:  [_text+123/261]
Jan  4 08:53:53 lore kernel:  [_text+0/261]
Jan  4 08:53:53 lore kernel: Code: 66 7a 02 00 83 c4 08 5b e9 ed 1d 4a 00 8d b6 00 00 00 00 8d bc 27 00 00 00 00 b9 00 00 60 00 53 89 c3 89 c8 66 89 d0 66 ba 00 8e <89> 04 dd 00 d0 8a c0 89 14 dd 04 d0 8a c0 5b c3 90 90 90 90 90
Jan  4 08:54:24 lore shutdown[21106]: shutting down for system reboot
Jan  4 08:54:38 lore kernel: Kernel logging (proc) stopped.
Jan  4 08:54:38 lore kernel: Kernel log daemon terminating.
Jan  4 08:54:38 lore exiting on signal 15

PostPosted: Wed Jan 04, 2006 5:24 pm
by Raf256
In relation to
http://grsecurity.net/pipermail/grsecurity/2005-November/000616.html
following part of .config of crashin kernels might be relevant

Code: Select all
CONFIG_PCI=y
# CONFIG_PCI_GOBIOS is not set
# CONFIG_PCI_GOMMCONFIG is not set
# CONFIG_PCI_GODIRECT is not set
CONFIG_PCI_GOANY=y
CONFIG_PCI_DIRECT=y
CONFIG_PCI_MMCONFIG=y
CONFIG_PCIEPORTBUS=y
CONFIG_HOTPLUG_PCI_PCIE=m


Code: Select all
CONFIG_PAX_NOEXEC=y
CONFIG_PAX_PAGEEXEC=y
# CONFIG_PAX_SEGMEXEC is not set
# CONFIG_PAX_EMUTRAMP is not set
CONFIG_PAX_MPROTECT=y
# CONFIG_PAX_NOELFRELOCS is not set
CONFIG_PAX_KERNEXEC=y

PostPosted: Wed Jan 04, 2006 9:50 pm
by Raf256
Ok, Pipacs wrote a simple patch correcting that problem, it can be downloaded from
http://www.grsecurity.net/~paxguy1/pax-linux-2.6.14-kernexec-fix.patch

The patch is:
Code: Select all
diff -u linux-2.6.14-pax/arch/i386/kernel/traps.c linux-2.6.14-pax/arch/i386/kernel/traps.c
--- linux-2.6.14-pax/arch/i386/kernel/traps.c 2005-12-28 16:46:00.000000000 +0100
+++ linux-2.6.14-pax/arch/i386/kernel/traps.c 2006-01-04 22:44:23.000000000 +0100
@@ -1059,7 +1059,19 @@
  */
 void set_intr_gate(unsigned int n, void *addr)
 {
+
+#ifdef CONFIG_PAX_KERNEXEC
+ unsigned long cr0;
+
+ pax_open_kernel(cr0);
+#endif
+
  _set_gate(idt_table+n,14,0,addr,__KERNEL_CS);
+
+#ifdef CONFIG_PAX_KERNEXEC
+ pax_close_kernel(cr0);
+#endif
+
 }
 /*


So that:
vim arch/i386/kernel/traps.c +1059
will be like:
Code: Select all
void set_intr_gate(unsigned int n, void *addr)
{

#ifdef CONFIG_PAX_KERNEXEC
  unsigned long cr0;

  pax_open_kernel(cr0);
#endif

  _set_gate(idt_table+n,14,0,addr,__KERNEL_CS);

#ifdef CONFIG_PAX_KERNEXEC
  pax_close_kernel(cr0);
#endif
}


But if that will not work try also this one:
Code: Select all
void set_intr_gate(unsigned int n, void *addr)
{

#ifdef CONFIG_PAX_KERNEXEC
  unsigned long cr0, flags;

  pax_open_kernel(flags,cr0);
#endif

  _set_gate(idt_table+n,14,0,addr,__KERNEL_CS);

#ifdef CONFIG_PAX_KERNEXEC
  pax_close_kernel(flags,cr0);
#endif
}