Subject: [alpine-devel] Bug in rpc.mountd

From: alex M <[email-masked]>
Date: Mon, 21 May 2012 09:19:04 +0200

Hi,

I upgade from 2.4.1 to 2.4.2 and now I got a real problem with the nfs daemon:

[  482.292020] rpc.mountd[2043]: segfault at 7873d1d796c8 ip
0000786bd1b52c96 sp 00007ae3fb88a470 error 4 in
libuClibc-0.9.33.2.so[786bd1b07000+6b000]
[  482.292057] grsec: Segmentation fault occurred at 00007873d1d796c8
in /usr/sbin/rpc.mountd[rpc.mountd:2043] uid/euid:0/0 gid/egid:0/0,
parent /bin/busybox[init:1] uid/euid:0/0 gid/egid:0/0
[  482.292087] grsec: denied resource overstep by requesting 4096 for
RLIMIT_CORE against limit 0 for /usr/sbin/rpc.mountd[rpc.mountd:2043]
uid/euid:0/0 gid/egid:0/0, parent /bin/busybox[init:1] uid/euid:0/0
gid/egid:0/0

That's a real problem since the main purpose of the computer running
alpinelinux is to be a NFS server.

I just want to report this bug and pray it can be fix quickly,
otherwise I had to reinstall my box with something that don't broke
NFS server.

Regards.

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Natanael Copa <[email-masked]>
Date: Mon, 21 May 2012 13:58:12 +0200

On Mon, 21 May 2012 09:19:04 +0200

> libuClibc-0.9.33.2.so[786bd1b07000+6b000]

what does 'apk version libc0.9.32' show?

It looks like you have uclibc version 0.9.33.2 installed, which to my
understanding only should be available from 'edge' repositories.

Please check that you only have v2.4 and no 'edge'
in /etc/apk/repositories.

> otherwise I had to reinstall my box with something that don't broke

Did it work with alpine 2.4.1?

What kernel version is it? uname -a

-nc

Thanks!

---

---

From: Natanael Copa <[email-masked]>
Date: Mon, 21 May 2012 14:02:08 +0200

> uid/euid:0/0 gid/egid:0/0, parent /bin/busybox[init:1] uid/euid:0/0

A few more questions,

When does the segfault happen? When you start the daemon? then the
client mounts? At random?

---

---

From: Natanael Copa <[email-masked]>
Date: Mon, 21 May 2012 15:27:38 +0200

> otherwise I had to reinstall my box with something that don't broke

Ok. I was able to reproduce. It works on 2.4.1, it segfaults on
x86_64 2.4.2 within uclibc code and it segfaults on startup.

What is interesting is that only relevant thing changed between 2.4.1
and 2.4.2 is the kernel.

I will try make a debug build here and generate a core dump.

Thanks!

-nc

---

---

From: alex M <[email-masked]>
Date: Mon, 21 May 2012 16:47:47 +0200

Hi,

I answered only to you, so I repost it to the ml.

bei:~# apk version 'libc0.9.32'
Installed:                                Available:
libc0.9.32-0.9.33.2-r1                  = 0.9.33.2-r1

bei:~# cat /etc/apk/repositories
/media/usb/apks
http://nl.alpinelinux.org/alpine/v2.4/main

bei:~# uname -a
Linux bei 3.3.6-grsec #1-Alpine SMP Mon May 14 13:42:17 UTC 2012 x86_64 Linux

And yes it was working with the 2.4.1

The segfault happen when I try to mount the nfs share. I can let you
an SSH access if you want to check around my system.

Thanks for taking care of this problem.

Regards,

---

---

From: Natanael Copa <[email-masked]>
Date: Mon, 21 May 2012 17:06:12 +0200

On Mon, 21 May 2012 16:47:47 +0200

> an SSH access if you want to check around my system.

Will not be necessary. I am able to reproduce it here.

I noticed there are a new grsec patch available and a new version of
nfs-utils. I'll test those and if they work I'll push them to v2.4

Thanks!

> >> [  482.292057] grsec: Segmentation fault occurred at
> >> 00007873d1d796c8 in /usr/sbin/rpc.mountd[rpc.mountd:2043]
> >> uid/euid:0/0 gid/egid:0/0, parent /bin/busybox[init:1]
> >> uid/euid:0/0 gid/egid:0/0 [  482.292087] grsec: denied resource
> >> overstep by requesting 4096 for RLIMIT_CORE against limit 0
> >> for /usr/sbin/rpc.mountd[rpc.mountd:2043] uid/euid:0/0
> >> gid/egid:0/0, parent /bin/busybox[init:1] uid/euid:0/0 gid/egid:0/0
> >>
> >> That's a real problem since the main purpose of the computer
> >> running alpinelinux is to be a NFS server.
> >>
> > What is interesting is that only relevant thing changed between
> > 2.4.1 and 2.4.2 is the kernel.
> >

---

---

From: Natanael Copa <[email-masked]>
Date: Mon, 21 May 2012 19:45:50 +0200

> libc0.9.32-0.9.33.2-r1                  = 0.9.33.2-r1

This is wrong. .2 is only in edge.
 
> http://nl.alpinelinux.org/alpine/v2.4/main

I figured out what was wrong. The 2.4.2 iso build box pulled in
packages from edge when generating the iso. This also explains bug
http://bugs.alpinelinux.org/issues/1173 which didn't make any sense to
me.

I will push v2.4.3 ASAP. (tomorrow most likely)

Meanwhile, you can 'apk upgrade -U -a', restart nfs (you might
need /etc/init.d/nfs zap) and then wait with rebooting the box til
v2.4.3 is installed.

Sorry!

PS. This means there still is a bug in uclibc edge that needs
investigating.

---