[Bug 10551] New: Daemon infinite loop when no matched user in secrets

samba-bugs at samba.org samba-bugs at samba.org
Sun Apr 13 04:41:23 MDT 2014


           Summary: Daemon infinite loop when no matched user in secrets
           Product: rsync
           Version: 3.1.1
          Platform: x64
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P5
         Component: core
        AssignedTo: wayned at samba.org
        ReportedBy: ryan at finnie.org
         QAContact: rsync-qa at samba.org

Created attachment 9850
  --> https://bugzilla.samba.org/attachment.cgi?id=9850
Strace output of infinite loop

Hello.  Given a test module:

  path = /tmp
  auth users = *
  secrets file = /tmp/rsyncd.secrets

and secrets file:


and running a daemon, good user / good password and good user / bad password
work as expected:

$ RSYNC_PASSWORD=goodpass rsync rsync://gooduser@host/test-module/
drwxrwxrwt         12,288 2014/04/13 03:31:34 .

$ RSYNC_PASSWORD=badpass rsync rsync://gooduser@host/test-module/
@ERROR: auth failed on module test-module
rsync error: error starting client-server protocol (code 5) at main.c(1653)

But specifying a nonexistent username puts the daemon into an infinite loop.

$ RSYNC_PASSWORD=badpass rsync rsync://baduser@host/test-module/

A partial strace is attached, but basically it reads to the end of
rsync.d.secrets, then loops:

27953 select(5, [4], NULL, [4], {60, 0}) = 1 (in [4], left {59, 999999})
27953 read(4, "", 1)                    = 0

The parent process remains open for other connections, but the child process
goes into a CPU spin.

I've done a git bisect, and the problem appears to have been introduced with
commit 5ebe9a46d7f3c846a6d665cb8c6ab8b79508a6df (Add @group auth and overrides
to "auth user" daemon config.).

Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the rsync mailing list