kernel panic in vsftpd on grsec-2.9.1-3.2.36-201301032034
Posted: Fri Jan 18, 2013 8:56 pm
Hi, I'm having kernel panics on grsec-2.9.1-3.2.36-201301032034 (and few previous 3.2 versions). It seems to always (6 out of 6 times) be triggered by vsftpd FTP daemon. I've managed to grab output from serial console:
The vsftpd is from debian stable - version 2.3.2-3+squeeze2
The same system works normally on grsec-2.9.1-2.6.32.60-201212271948 (for long time - days).
It also seems to work normally on vanilla 3.2.36 without grsec (although it has only been tested for an hour to minimize risk to production machine, it didn't crash, while 3.2.36-grsec-2.9.1-3.2.36-201301032034 crashed 6 times in 5-20 minutes since boot each time).
It also survives on 3.2.36-grsec-2.9.1-3.2.36-201301032034 for an hour at least if I shutdown vsftpd.
Setting up the test machine with same debian/kernel/grsec/vsftpd and logging in and out of FTP and transfering files does not seem to trigger the bug. So either the test machine is immune, or only specific condition triggers the bug and I'm not managing to get it.
what more info can I provide or try to help hunt this down? thanks!
- Code: Select all
grsec: From 93.141.53.168: (default:D:/usr/sbin/vsftpd) use of CAP_SYS_ADMIN denied for /usr/sbin/vsftpd[vsftpd:27314] uid/eu
id:0/0 gid/egid:0/0, parent /usr/sbin/vsftpd[vsftpd:1865] uid/euid:0/0 gid/egid:0/0
grsec: From 195.190.136.139: (default:D:/usr/sbin/vsftpd) use of CAP_SYS_ADMIN denied for /usr/sbin/vsftpd[vsftpd:29783] uid/euid:0/0 gid/egid:0/0, parent /usr/sbin/vsftpd[vsftpd:1865] uid/euid:0/0 gid/egid:0/0
grsec: From 195.190.136.139: (default:D:/usr/sbin/vsftpd) use of CAP_SYS_ADMIN denied for /usr/sbin/vsftpd[vsftpd:31607] uid/euid:0/0 gid/egid:0/0, parent /usr/sbin/vsftpd[vsftpd:1865] uid/euid:0/0 gid/egid:0/0
BUG: unable to handle kernel NULL pointer dereference at 0000000000000030
IP: [<ffffffff810deef4>] __remove_shared_vm_struct.isra.25+0x23/0x7b
PGD 5c1545000
Thread overran stack, or stack corrupted
Oops: 0000 [#1] SMP
CPU 1
Modules linked in: ip6t_REJECT ip6t_LOG ip6table_filter ip6_tables ipt_LOG ipt_REJECT xt_tcpudp iptable_filter ip_tables x_tables fuse xfs exportfs ipv6 nls_iso8859_1 nls_cp437 ext2 ide_generic ide_core isofs vfat fat r8169 mii softdog
Pid: 19815, comm: vsftpd Not tainted 3.2.36-grsec-2.9.1-3.2.36-201301032034 #6 MSI MS-7522/MSI X58 Pro-E (MS-7522)
RIP: 0010:[<ffffffff810deef4>] [<ffffffff810deef4>] __remove_shared_vm_struct.isra.25+0x23/0x7b
RSP: 0018:ffff8805bf4f3ca8 EFLAGS: 00010202
RAX: 0000000000000000 RBX: ffff8806159d8e10 RCX: 0000000000000000
RDX: ffff8806159d8e10 RSI: ffff880617830b18 RDI: ffff8805c2e6d398
RBP: ffff8805bf4f3cc8 R08: 0000000000000000 R09: 0000000000004842
R10: 0000000000004842 R11: 0000000000000200 R12: ffff880617830b18
R13: ffff8806159d8e50 R14: ffff8806159d8e10 R15: ffff8805c2e6d398
FS: 0000000000000000(0000) GS:ffff88063fc40000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000030 CR3: 000000000143b000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process vsftpd (pid: 19815, threadinfo ffff8805f9aba1f8, task ffff8805f9ab9dc0)
Stack:
0000000000000000 ffff8805c2e6d398 ffff880617830b00 ffff8805c2e6d398
ffff8805bf4f3cf8 ffffffff810df0e1 ffff8805c2e6d0b8 ffff8805bf4f3d60
0000000000000000 0000000000000000 ffff8805bf4f3d48 ffffffff810d8d49
Call Trace:
[<ffffffff810df0e1>] unlink_file_vma+0x3d/0x54
[<ffffffff810d8d49>] free_pgtables+0x3e/0xce
[<ffffffff810e0206>] exit_mmap+0xca/0x114
[<ffffffff81038a8d>] mmput+0x61/0x108
[<ffffffff8103e754>] exit_mm+0x175/0x188
[<ffffffff8103e9c5>] do_exit+0x25e/0x756
[<ffffffff8103f197>] do_group_exit+0x67/0x9a
[<ffffffff8103f1dd>] sys_exit_group+0x13/0x13
[<ffffffff81428d10>] system_call_fastpath+0x18/0x1d
Code: 5d 48 0f ba 2c 24 3f c3 55 48 89 e5 41 54 49 89 f4 53 48 89 d3 48 83 ec 10 48 89 7d e8 48 8b 7d e8 f6 47 31 08 74 1a 49 8b 04 24 <48> 8b 40 30 f0 ff 80 24 01 00 00 71 09 f0 ff 88 24 01 00 00 cd
RIP [<ffffffff810deef4>] __remove_shared_vm_struct.isra.25+0x23/0x7b
RSP <ffff8805bf4f3ca8>
CR2: 0000000000000030
---[ end trace 1325c063a4ec72cb ]---
Kernel panic - not syncing: Fatal exception
The vsftpd is from debian stable - version 2.3.2-3+squeeze2
The same system works normally on grsec-2.9.1-2.6.32.60-201212271948 (for long time - days).
It also seems to work normally on vanilla 3.2.36 without grsec (although it has only been tested for an hour to minimize risk to production machine, it didn't crash, while 3.2.36-grsec-2.9.1-3.2.36-201301032034 crashed 6 times in 5-20 minutes since boot each time).
It also survives on 3.2.36-grsec-2.9.1-3.2.36-201301032034 for an hour at least if I shutdown vsftpd.
Setting up the test machine with same debian/kernel/grsec/vsftpd and logging in and out of FTP and transfering files does not seem to trigger the bug. So either the test machine is immune, or only specific condition triggers the bug and I'm not managing to get it.
what more info can I provide or try to help hunt this down? thanks!