[Bug 662861] [NEW] [lucid] kernel traceback when profiling openvpn

Jamie Strandboge jamie at ubuntu.com
Mon Oct 18 18:41:43 UTC 2010


Public bug reported:

Running the attached reproducer, I get the following traceback:

Oct 18 18:29:45 sec-lucid-amd64 kernel: [  118.280754] ------------[ cut here ]------------
Oct 18 18:29:45 sec-lucid-amd64 kernel: [  118.280758] kernel BUG at /build/buildd/linux-2.6.32/kernel/cred.c:511!
Oct 18 18:29:45 sec-lucid-amd64 kernel: [  118.280761] invalid opcode: 0000 [#2] SMP
Oct 18 18:29:45 sec-lucid-amd64 kernel: [  118.280764] last sysfs file: /sys/devices/virtual/net/tun0/type
Oct 18 18:29:45 sec-lucid-amd64 kernel: [  118.280766] CPU 0
Oct 18 18:29:45 sec-lucid-amd64 kernel: [  118.280767] Modules linked in: binfmt_misc ppdev lp parport fbcon tileblit font bitblit softcursor virtio_balloon psmouse serio_raw vga16fb vgastate i2c_piix4 floppy virtio_blk virtio_net virtio_pci virtio_ring virtio
Oct 18 18:29:45 sec-lucid-amd64 kernel: [  118.280785] Pid: 2222, comm: ifconfig Tainted: G      D    2.6.32-25-generic #44-Ubuntu Bochs
Oct 18 18:29:45 sec-lucid-amd64 kernel: [  118.280787] RIP: 0010:[<ffffffff8108b0ba>]  [<ffffffff8108b0ba>] commit_creds+0x1da/0x1e0
Oct 18 18:29:45 sec-lucid-amd64 kernel: [  118.280796] RSP: 0018:ffff88001cb79bf8  EFLAGS: 00010202
Oct 18 18:29:45 sec-lucid-amd64 kernel: [  118.280797] RAX: 0000000000000001 RBX: ffff88000eb3c3c0 RCX: 0000000000000000
Oct 18 18:29:45 sec-lucid-amd64 kernel: [  118.280799] RDX: 0000000000000000 RSI: ffffffff81282570 RDI: ffff88001557b3c0
Oct 18 18:29:45 sec-lucid-amd64 kernel: [  118.280800] RBP: ffff88001cb79c18 R08: 0000000000000000 R09: ffff8800115a7fc0
Oct 18 18:29:45 sec-lucid-amd64 kernel: [  118.280801] R10: 00007fffd4a48150 R11: 0000000000000206 R12: ffff88001557b3c0
Oct 18 18:29:45 sec-lucid-amd64 kernel: [  118.280845] R13: ffff8800154e0000 R14: ffffffff817bd1a0 R15: ffff88001cb79d88
Oct 18 18:29:45 sec-lucid-amd64 kernel: [  118.280848] FS:  00007fb4aaf47700(0000) GS:ffff880001c00000(0000) knlGS:0000000000000000
Oct 18 18:29:45 sec-lucid-amd64 kernel: [  118.280850] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Oct 18 18:29:45 sec-lucid-amd64 kernel: [  118.280851] CR2: 00007fb4aaa9d7a0 CR3: 00000000116f2000 CR4: 00000000000006f0
Oct 18 18:29:45 sec-lucid-amd64 kernel: [  118.280856] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Oct 18 18:29:45 sec-lucid-amd64 kernel: [  118.280861] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Oct 18 18:29:45 sec-lucid-amd64 kernel: [  118.280863] Process ifconfig (pid: 2222, threadinfo ffff88001cb78000, task ffff8800154e0000)
Oct 18 18:29:45 sec-lucid-amd64 kernel: [  118.280864] Stack:
Oct 18 18:29:45 sec-lucid-amd64 kernel: [  118.280865]  ffff88001cb79c18 ffff8800115a7fc0 ffff88001f032800 ffff88001557b3c0
Oct 18 18:29:45 sec-lucid-amd64 kernel: [  118.280868] <0> ffff88001cb79c48 ffffffff8127edae ffff88001cb79c48 ffff88001f032800
Oct 18 18:29:45 sec-lucid-amd64 kernel: [  118.280871] <0> ffff88001f032800 ffff88001f18d458 ffff88001cb79c98 ffffffff81284e04
Oct 18 18:29:45 sec-lucid-amd64 kernel: [  118.280874] Call Trace:
Oct 18 18:29:45 sec-lucid-amd64 kernel: [  118.280884]  [<ffffffff8127edae>] aa_replace_current_profiles+0xce/0xe0
Oct 18 18:29:45 sec-lucid-amd64 kernel: [  118.280888]  [<ffffffff81284e04>] apparmor_sysctl+0x144/0x150
Oct 18 18:29:45 sec-lucid-amd64 kernel: [  118.280893]  [<ffffffff81251d63>] security_sysctl+0x13/0x20
Oct 18 18:29:45 sec-lucid-amd64 kernel: [  118.280898]  [<ffffffff81070265>] sysctl_perm+0x35/0xd0
Oct 18 18:29:45 sec-lucid-amd64 kernel: [  118.280902]  [<ffffffff811a3cd5>] proc_sys_permission+0x55/0xc0
Oct 18 18:29:45 sec-lucid-amd64 kernel: [  118.280906]  [<ffffffff8114f139>] __link_path_walk+0x99/0xf80
Oct 18 18:29:45 sec-lucid-amd64 kernel: [  118.280909]  [<ffffffff8115029a>] path_walk+0x6a/0xe0
Oct 18 18:29:45 sec-lucid-amd64 kernel: [  118.280911]  [<ffffffff8115046b>] do_path_lookup+0x5b/0xa0
Oct 18 18:29:45 sec-lucid-amd64 kernel: [  118.280913]  [<ffffffff81151137>] user_path_at+0x57/0xa0
Oct 18 18:29:45 sec-lucid-amd64 kernel: [  118.280915]  [<ffffffff8127e9cd>] ? aa_dup_task_context+0x3d/0x70
Oct 18 18:29:45 sec-lucid-amd64 kernel: [  118.280918]  [<ffffffff81284060>] ? apparmor_cred_prepare+0x40/0x60
Oct 18 18:29:45 sec-lucid-amd64 kernel: [  118.280921]  [<ffffffff812523c6>] ? security_prepare_creds+0x16/0x20
Oct 18 18:29:45 sec-lucid-amd64 kernel: [  118.280925]  [<ffffffff81141cc1>] sys_faccessat+0xd1/0x1d0
Oct 18 18:29:45 sec-lucid-amd64 kernel: [  118.280927]  [<ffffffff81141dd8>] sys_access+0x18/0x20
Oct 18 18:29:45 sec-lucid-amd64 kernel: [  118.280931]  [<ffffffff810121b2>] system_call_fastpath+0x16/0x1b
Oct 18 18:29:45 sec-lucid-amd64 kernel: [  118.280933] Code: 30 41 8b 54 24 34 8b 4b 34 f7 d0 41 85 44 24 30 0f 85 94 fe ff ff 89 c8 f7 d0 85 d0 0f 84 aa fe ff ff e9 83 fe ff ff 0f 0b eb fe <0f> 0b eb fe 66 90 55 48 89 e5 53 48 83 ec 08 0f 1f 44 00 00 48
Oct 18 18:29:45 sec-lucid-amd64 kernel: [  118.280951] RIP  [<ffffffff8108b0ba>] commit_creds+0x1da/0x1e0
Oct 18 18:29:45 sec-lucid-amd64 kernel: [  118.280953]  RSP <ffff88001cb79bf8>
Oct 18 18:29:45 sec-lucid-amd64 kernel: [  118.280955] ---[ end trace 0aaf0dd36b412741 ]---

Run the reproducer like so:
$ sudo ./apparmor-openvpn-reproducer.sh
tmpdir: /tmp/tmp.Js3eLEOAkh
...
Disabling kernel rate limiting
kernel.printk_ratelimit = 0
== Attempt: 1 ==
apparmor_parser -a
openvpn stop
openvpn start
apparmor_parser -R
apparmor_parser -a
apparmor_parser -R
apparmor_parser -r -T -W
openvpn stop
== Attempt: 2 ==
apparmor_parser -a
Oct 18 18:37:51 sec-lucid-amd64 kernel: [  603.901095] ---[ end trace 0aaf0dd36b412742 ]---
FAIL
Cleaning up

Please do not run this reproducer on a production machine.

This does not appear to affect maverick (at least my reproducer doesn't
trigger it) and upgrading to apparmor 2.5.1 (pending in lucid-proposed)
does not help. Can reproduce readily on i386 and amd64. Once the cache
file is created and the machine is rebooted, enforcement seems fine.

** Affects: linux (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: apparmor

-- 
[lucid] kernel traceback when profiling openvpn
https://bugs.launchpad.net/bugs/662861
You received this bug notification because you are a member of Kernel
Bugs, which is subscribed to linux in ubuntu.




More information about the kernel-bugs mailing list