openwrt / openwrt/packages

vsftpd: Segfaults when client connects, completely broken

Open
#19,902 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Makefile
Stars
4.6k
Forks
4k
Avg merge
3d 12h
Merged PRs (30d)
134

Description

Maintainer: @neheb
Environment: x86_64 (PCengines APU2) OpenWrt 21.02.0 r16279-5cc0535800

Package: vsftpd
Version: 3.0.3-3
Depends: libc
Status: install user installed
Section: net
Architecture: x86_64
Size: 52259
Filename: vsftpd_3.0.3-3_x86_64.ipk

Background/setup: vsftpd fails with 500 OOPS: child died upon connecting unless you use one of the fixes in #9636. Both options (disabling seccomp in the config OR installing the two seccomp packages) yield the same outcome. It doesn't look like there are any other plain ftp servers in the OpenWRT repositories to choose from.

Description: vsftpd segfaults when a client tries to connect with a username and password.

Client sees this:

Status:	Connecting to 10.10.10.1:21...
Status:	Connection established, waiting for welcome message...
Response:	220 (vsFTPd 3.0.3)
Command:	AUTH TLS
Response:	530 Please login with USER and PASS.
Command:	AUTH SSL
Response:	530 Please login with USER and PASS.
Status:	Insecure server, it does not support FTP over TLS.
Command:	USER broftp
Response:	331 Please specify the password.
Command:	PASS ****************
Error:	Connection closed by server
Error:	Could not connect to server

Server sees this on dmesg (one pair of lines per login attempt):

[2080197.185425] vsftpd[8451]: segfault at 0 ip 00007ff2da2589d0 sp 00007ffdf01ab2c8 error 4 in libc.so[7ff2da254000+49000]
[2080197.197008] Code: c3 01 0f b6 03 84 c0 75 f1 48 89 d8 5b c3 0f 1f 40 00 67 e8 c2 03 00 00 48 01 d8 5b c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 <0f> b6 07 0f b6 16 38 c2 75 25 84 d2 74 2a b8 01 00 00 00 eb 0b 0f
[2080202.244082] vsftpd[8459]: segfault at 0 ip 00007ff2da2589d0 sp 00007ffdf01ab2c8 error 4 in libc.so[7ff2da254000+49000]
[2080202.255253] Code: c3 01 0f b6 03 84 c0 75 f1 48 89 d8 5b c3 0f 1f 40 00 67 e8 c2 03 00 00 48 01 d8 5b c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 <0f> b6 07 0f b6 16 38 c2 75 25 84 d2 74 2a b8 01 00 00 00 eb 0b 0f
[2081836.707927] vsftpd[9335]: segfault at 0 ip 00007f73d10519d0 sp 00007ffe82d1cd88 error 4 in libc.so[7f73d104d000+49000]
[2081836.718911] Code: c3 01 0f b6 03 84 c0 75 f1 48 89 d8 5b c3 0f 1f 40 00 67 e8 c2 03 00 00 48 01 d8 5b c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 <0f> b6 07 0f b6 16 38 c2 75 25 84 d2 74 2a b8 01 00 00 00 eb 0b 0f
[2081841.759429] vsftpd[9341]: segfault at 0 ip 00007f73d10519d0 sp 00007ffe82d1cd88 error 4 in libc.so[7f73d104d000+49000]
[2081841.771024] Code: c3 01 0f b6 03 84 c0 75 f1 48 89 d8 5b c3 0f 1f 40 00 67 e8 c2 03 00 00 48 01 d8 5b c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 <0f> b6 07 0f b6 16 38 c2 75 25 84 d2 74 2a b8 01 00 00 00 eb 0b 0f
[2081846.811444] vsftpd[9346]: segfault at 0 ip 00007f73d10519d0 sp 00007ffe82d1cd88 error 4 in libc.so[7f73d104d000+49000]
[2081846.822398] Code: c3 01 0f b6 03 84 c0 75 f1 48 89 d8 5b c3 0f 1f 40 00 67 e8 c2 03 00 00 48 01 d8 5b c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 <0f> b6 07 0f b6 16 38 c2 75 25 84 d2 74 2a b8 01 00 00 00 eb 0b 0f
[2081851.870281] vsftpd[9350]: segfault at 0 ip 00007f73d10519d0 sp 00007ffe82d1cd88 error 4 in libc.so[7f73d104d000+49000]
[2081851.881821] Code: c3 01 0f b6 03 84 c0 75 f1 48 89 d8 5b c3 0f 1f 40 00 67 e8 c2 03 00 00 48 01 d8 5b c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 <0f> b6 07 0f b6 16 38 c2 75 25 84 d2 74 2a b8 01 00 00 00 eb 0b 0f
[2082354.885853] vsftpd[10007]: segfault at 0 ip 00007f504d4aa9d0 sp 00007ffc231584f8 error 4 in libc.so[7f504d4a6000+49000]
[2082354.897466] Code: c3 01 0f b6 03 84 c0 75 f1 48 89 d8 5b c3 0f 1f 40 00 67 e8 c2 03 00 00 48 01 d8 5b c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 <0f> b6 07 0f b6 16 38 c2 75 25 84 d2 74 2a b8 01 00 00 00 eb 0b 0f
[2082359.950845] vsftpd[10013]: segfault at 0 ip 00007f504d4aa9d0 sp 00007ffc231584f8 error 4 in libc.so[7f504d4a6000+49000]
[2082359.962342] Code: c3 01 0f b6 03 84 c0 75 f1 48 89 d8 5b c3 0f 1f 40 00 67 e8 c2 03 00 00 48 01 d8 5b c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 <0f> b6 07 0f b6 16 38 c2 75 25 84 d2 74 2a b8 01 00 00 00 eb 0b 0f
[2082365.058471] vsftpd[10019]: segfault at 0 ip 00007f504d4aa9d0 sp 00007ffc231584f8 error 4 in libc.so[7f504d4a6000+49000]
[2082365.069537] Code: c3 01 0f b6 03 84 c0 75 f1 48 89 d8 5b c3 0f 1f 40 00 67 e8 c2 03 00 00 48 01 d8 5b c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 <0f> b6 07 0f b6 16 38 c2 75 25 84 d2 74 2a b8 01 00 00 00 eb 0b 0f

Nothing otherwise obvious in logread and /var/log/vsftpd.log is empty.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the vsftpd client login failure on the stated OpenWrt 21.02.0 x86_64 environment, comparing seccomp enabled and disabled configurations and the fixes referenced in #9636. The payload names no source file or test; done means a client can authenticate with a username and password without the server process segfaulting.

Written by the indexing model from the issue text.

Assessment

Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.