[apparmor] [Bug 789409] [NEW] /proc/[PID]/attr/current overwrite Null pointer dereference

Emanuel Bronshtein 789409 at bugs.launchpad.net
Sat May 28 01:14:09 UTC 2011


*** This bug is a security vulnerability ***

Private security bug reported:

test case (from gnome-terminal+bash):
emanuel at emanuel-desktop:~$ echo 'AAA AAA' > /proc/$$/attr/current # the tab crashed 
emanuel at emanuel-desktop:~$ dmesg | tail -n 28 # on other tab in gnome-terminal
[107353.169116] ------------[ cut here ]------------
[107353.169142] kernel BUG at /build/buildd/linux-2.6.38/security/apparmor/audit.c:183!
[107353.169159] invalid opcode: 0000 [#7] SMP 
[107353.169176] last sysfs file: /sys/devices/pci0000:00/0000:00:0d.0/host2/target2:0:0/2:0:0:0/block/sda/sda1/uevent
[107353.169193] Modules linked in: nls_utf8 isofs vesafb binfmt_misc vboxsf snd_intel8x0 snd_ac97_codec ac97_bus snd_pcm snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq ppdev snd_timer snd_seq_device snd joydev psmouse parport_pc serio_raw vboxguest soundcore i2c_piix4 snd_page_alloc lp parport usbhid ahci hid e1000 libahci
[107353.169251] 
[107353.169268] Pid: 8851, comm: bash Tainted: G      D     2.6.38-8-generic #42-Ubuntu innotek GmbH VirtualBox
[107353.169289] EIP: 0060:[<c1244939>] EFLAGS: 00210246 CPU: 0
[107353.169313] EIP is at aa_audit+0x129/0x160
[107353.169329] EAX: 00000002 EBX: f2c35eb4 ECX: 000000d0 EDX: 00000000
[107353.169344] ESI: 00000008 EDI: f2c35f1c EBP: f2c35e90 ESP: f2c35e84
[107353.169360]  DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
[107353.169376] Process bash (pid: 8851, ti=f2c34000 task=c6c01940 task.ti=f2c34000)
[107353.169389] Stack:
[107353.169402]  00000004 00000008 f2c35f1c f2c35f2c c1249a95 f2c35eb4 00000000 d0e4e000
[107353.169424]  00000000 d0e4e004 d0dd0aa4 d0e4e004 00000007 00000000 00000000 00000000
[107353.169784]  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[107353.169808] Call Trace:
[107353.169832]  [<c1249a95>] apparmor_setprocattr+0x205/0x210
[107353.169856]  [<c121c40e>] security_setprocattr+0x1e/0x30
[107353.169877]  [<c1171c26>] proc_pid_attr_write+0xe6/0x100
[107353.169896]  [<c11271a2>] vfs_write+0xa2/0x170
[107353.169915]  [<c1171b40>] ? proc_pid_attr_write+0x0/0x100
[107353.169932]  [<c1127482>] sys_write+0x42/0x70
[107353.169955]  [<c1509bf4>] syscall_call+0x7/0xb
[107353.169969] Code: 00 00 8b 4b 04 85 c9 74 19 31 d2 b8 09 00 00 00 e8 2d cb e1 ff 8b 43 40 e9 62 ff ff ff 90 8d 74 26 00 64 8b 0d ec 54 83 c1 eb de <0f> 0b 83 3d 18 a2 90 c1 01 74 16 83 7a 3c 01 74 10 8b 0d 1c a2 
[107353.170048] EIP: [<c1244939>] aa_audit+0x129/0x160 SS:ESP 0068:f2c35e84
[107353.170073] ---[ end trace 824fc722cb1d8e19 ]---

tested on : Ubuntu 11.04 32 bit inside VirtualBox .

** Affects: apparmor
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of AppArmor
Developers, which is a direct subscriber.
https://bugs.launchpad.net/bugs/789409

Title:
  /proc/[PID]/attr/current overwrite Null pointer dereference

Status in AppArmor Linux application security framework:
  New

Bug description:
  test case (from gnome-terminal+bash):
  emanuel at emanuel-desktop:~$ echo 'AAA AAA' > /proc/$$/attr/current # the tab crashed 
  emanuel at emanuel-desktop:~$ dmesg | tail -n 28 # on other tab in gnome-terminal
  [107353.169116] ------------[ cut here ]------------
  [107353.169142] kernel BUG at /build/buildd/linux-2.6.38/security/apparmor/audit.c:183!
  [107353.169159] invalid opcode: 0000 [#7] SMP 
  [107353.169176] last sysfs file: /sys/devices/pci0000:00/0000:00:0d.0/host2/target2:0:0/2:0:0:0/block/sda/sda1/uevent
  [107353.169193] Modules linked in: nls_utf8 isofs vesafb binfmt_misc vboxsf snd_intel8x0 snd_ac97_codec ac97_bus snd_pcm snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq ppdev snd_timer snd_seq_device snd joydev psmouse parport_pc serio_raw vboxguest soundcore i2c_piix4 snd_page_alloc lp parport usbhid ahci hid e1000 libahci
  [107353.169251] 
  [107353.169268] Pid: 8851, comm: bash Tainted: G      D     2.6.38-8-generic #42-Ubuntu innotek GmbH VirtualBox
  [107353.169289] EIP: 0060:[<c1244939>] EFLAGS: 00210246 CPU: 0
  [107353.169313] EIP is at aa_audit+0x129/0x160
  [107353.169329] EAX: 00000002 EBX: f2c35eb4 ECX: 000000d0 EDX: 00000000
  [107353.169344] ESI: 00000008 EDI: f2c35f1c EBP: f2c35e90 ESP: f2c35e84
  [107353.169360]  DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
  [107353.169376] Process bash (pid: 8851, ti=f2c34000 task=c6c01940 task.ti=f2c34000)
  [107353.169389] Stack:
  [107353.169402]  00000004 00000008 f2c35f1c f2c35f2c c1249a95 f2c35eb4 00000000 d0e4e000
  [107353.169424]  00000000 d0e4e004 d0dd0aa4 d0e4e004 00000007 00000000 00000000 00000000
  [107353.169784]  00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  [107353.169808] Call Trace:
  [107353.169832]  [<c1249a95>] apparmor_setprocattr+0x205/0x210
  [107353.169856]  [<c121c40e>] security_setprocattr+0x1e/0x30
  [107353.169877]  [<c1171c26>] proc_pid_attr_write+0xe6/0x100
  [107353.169896]  [<c11271a2>] vfs_write+0xa2/0x170
  [107353.169915]  [<c1171b40>] ? proc_pid_attr_write+0x0/0x100
  [107353.169932]  [<c1127482>] sys_write+0x42/0x70
  [107353.169955]  [<c1509bf4>] syscall_call+0x7/0xb
  [107353.169969] Code: 00 00 8b 4b 04 85 c9 74 19 31 d2 b8 09 00 00 00 e8 2d cb e1 ff 8b 43 40 e9 62 ff ff ff 90 8d 74 26 00 64 8b 0d ec 54 83 c1 eb de <0f> 0b 83 3d 18 a2 90 c1 01 74 16 83 7a 3c 01 74 10 8b 0d 1c a2 
  [107353.170048] EIP: [<c1244939>] aa_audit+0x129/0x160 SS:ESP 0068:f2c35e84
  [107353.170073] ---[ end trace 824fc722cb1d8e19 ]---

  tested on : Ubuntu 11.04 32 bit inside VirtualBox .



More information about the AppArmor mailing list