vsftpd hangs with SIGCHLD when pam_exec.so is used

Bug #2069324 reported by Markus Wigge
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
vsftpd (Ubuntu)
Triaged
Undecided
Unassigned

Bug Description

When you try to run a script with pam_exec.so on login vsftpd freezes with SIGCHLD.

This was fixed in 2015 by redhat and never adopted to Debian/Ubunutu.

See also:
- https://bugzilla.redhat.com/show_bug.cgi?id=1198259
- https://git.centos.org/rpms/vsftpd/blob/54ac5fac29fcc1bb68f2e96e63ecfda655286ff8/f/SOURCES/0026-Prevent-hanging-in-SIGCHLD-handler.patch

Tags: server-todo
Revision history for this message
Markus Wigge (markus-cultcom) wrote :
Revision history for this message
Mitchell Dzurick (mitchdz) wrote :

Thank you for taking the time to make this bug report Markus!

Revision history for this message
Mitchell Dzurick (mitchdz) wrote :

What version of Ubuntu are you seeing this bug on? Unfortunately upstream/debian has been pretty dormant for a while, in-fact we are ahead of debian right now, so it may make sense to apply this patch.

Unfortunately it looks like even upstream does not have this patch applied.

Revision history for this message
Mitchell Dzurick (mitchdz) wrote :

Markus, if I were to create a PPA with this patch applied, would you be willing to help test that out?

Changed in vsftpd (Ubuntu):
status: New → Triaged
Revision history for this message
Markus Wigge (markus-cultcom) wrote : Re: [Bug 2069324] Re: vsftpd hangs with SIGCHLD when pam_exec.so is used

Hello,

actually I am running "bookworm" and noticed that the packet is quite
abandoned so I looked at the Ubuntu repository which had a newer release
of vsftpd but also quite old.

I build the ubuntu package on debian bookworm an noticed the same error.
Then I rebuilt the same package with the attached patch applied and now
it is working as expected. My custom script is run by pam_exec.so on
login as it was intended.

It would be great to see it applied upstream in Ubunutu and Debian as well.

Just add a line to /etc/pam.d/vsftpd like this:
account optional pam_exec.so debug quiet /root/my_script.sh

And simply run "logger test" inside.

Without the patch the vsftpd hangs as soon as someone logs in.

Kind Regards,
Markus

Am 15.06.24 um 02:50 schrieb Mitchell Dzurick:
> Markus, if I were to create a PPA with this patch applied, would you be
> willing to help test that out?
>
> ** Changed in: vsftpd (Ubuntu)
> Status: New => Triaged
>

Revision history for this message
Mitchell Dzurick (mitchdz) wrote :

Markus, would you mind making a bug report upstream to see if this could be included?

Revision history for this message
Markus Wigge (markus-cultcom) wrote :

Well, there is a bug report from 2020 about the problem:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=952421

Am 18.06.24 um 21:01 schrieb Mitchell Dzurick:
> Markus, would you mind making a bug report upstream to see if this could
> be included?
>

Revision history for this message
Paride Legovini (paride) wrote :

Looks like upstream development is *very* slow, and I could not find an issue tracker or a public vcs repo. Given that we have Ubuntu delta already (we're already ahead of Debian, which is still packaging 3.0.3), I believe it makes sense to add the patch to the Ubuntu package.

tags: added: server-todo
Revision history for this message
Mitchell Dzurick (mitchdz) wrote :

Markus, if we prepare a package with the patch, would you be willing to help out testing the patch?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.