From owner-freebsd-ports-bugs@freebsd.org Fri Aug 4 22:32:32 2017 Return-Path: Delivered-To: freebsd-ports-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A9DC7DCC824 for ; Fri, 4 Aug 2017 22:32:32 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 921937EA5D for ; Fri, 4 Aug 2017 22:32:32 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v74MWV03071721 for ; Fri, 4 Aug 2017 22:32:32 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 221233] security/sshguard: version 2.0 acts like a fork bomb with syslogd pipes Date: Fri, 04 Aug 2017 22:32:31 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: spambox@haruhiism.net X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-ports-bugs@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter cc flagtypes.name Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Aug 2017 22:32:32 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221233 Bug ID: 221233 Summary: security/sshguard: version 2.0 acts like a fork bomb with syslogd pipes Product: Ports & Packages Version: Latest Hardware: amd64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: freebsd-ports-bugs@FreeBSD.org Reporter: spambox@haruhiism.net CC: dan.mcgregor@usask.ca CC: dan.mcgregor@usask.ca Flags: maintainer-feedback?(dan.mcgregor@usask.ca) I upgraded to sshguard 2.0.0 recently and after a good while noticed load averages of 200+. sshguard is using the pf back-end along with the supplied /usr/local/etc/syslog.d/sshguard file that adds a pipe to sshguard. It appears this invocation method leads to sshguard spawning instances endlessly with each new log entry; here's just a very small snippet of "ps = aux | grep sshg": ... root 74839 0.0 0.0 6608 2548 - I Fri02 0:00.08 /usr/local/libexec/sshg-blocker -a 30 -p 120 -s root 74840 0.0 0.0 7048 2700 - I Fri02 0:00.00 /bin= /sh /usr/local/sbin/sshguard root 74841 0.0 0.0 7048 2684 - I Fri02 0:00.01 /bin= /sh /usr/local/libexec/sshg-fw-pf root 75123 0.0 0.0 7048 2700 - Is 09:51 0:00.01 /bin= /sh /usr/local/sbin/sshguard root 75125 0.0 0.0 7632 3144 - S 09:51 0:00.67 /usr/local/libexec/sshg-parser root 75126 0.0 0.0 6608 2548 - I 09:51 0:00.07 /usr/local/libexec/sshg-blocker -a 30 -p 120 -s root 75127 0.0 0.0 7048 2628 - Is Mon05 0:00.00 /bin= /sh /usr/local/sbin/sshguard root 75129 0.0 0.0 7632 3160 - S Mon05 0:01.49 /usr/local/libexec/sshg-parser root 75130 0.0 0.0 6608 2540 - S Mon05 0:00.35 /usr/local/libexec/sshg-blocker -a 30 -p 120 -s root 75131 0.0 0.0 7048 2628 - I Mon05 0:00.00 /bin= /sh /usr/local/sbin/sshguard root 75132 0.0 0.0 7048 2612 - I Mon05 0:00.03 /bin= /sh /usr/local/libexec/sshg-fw-pf root 75133 0.0 0.0 7048 2700 - I 09:51 0:00.00 /bin= /sh /usr/local/sbin/sshguard root 75134 0.0 0.0 7048 2684 - S 09:51 0:00.01 /bin= /sh /usr/local/libexec/sshg-fw-pf root 75204 0.0 0.0 7048 2700 - Is 03:05 0:00.01 /bin= /sh /usr/local/sbin/sshguard root 75206 0.0 0.0 7632 3132 - S 03:05 0:00.26 /usr/local/libexec/sshg-parser root 75207 0.0 0.0 6608 2548 - S 03:05 0:00.02 /usr/local/libexec/sshg-blocker -a 30 -p 120 -s root 75208 0.0 0.0 7048 2700 - I 03:05 0:00.00 /bin= /sh /usr/local/sbin/sshguard root 75209 0.0 0.0 7048 2684 - I 03:05 0:00.01 /bin= /sh /usr/local/libexec/sshg-fw-pf root 75654 0.0 0.0 7048 2700 - Is 20:25 0:00.01 /bin= /sh /usr/local/sbin/sshguard root 75656 0.0 0.0 7632 3140 - S 20:25 0:00.57 /usr/local/libexec/sshg-parser root 75657 0.0 0.0 6608 2548 - S 20:25 0:00.04 /usr/local/libexec/sshg-blocker -a 30 -p 120 -s root 75658 0.0 0.0 7048 2700 - I 20:25 0:00.00 /bin= /sh /usr/local/sbin/sshguard root 75659 0.0 0.0 7048 2684 - I 20:25 0:00.01 /bin= /sh /usr/local/libexec/sshg-fw-pf root 76232 0.0 0.0 7048 2632 - Is Wed18 0:00.00 /bin= /sh /usr/local/sbin/sshguard root 76234 0.0 0.0 7632 3152 - S Wed18 0:01.25 /usr/local/libexec/sshg-parser root 76235 0.0 0.0 6608 2548 - S Wed18 0:00.18 /usr/local/libexec/sshg-blocker -a 30 -p 120 -s root 76236 0.0 0.0 7048 2632 - I Wed18 0:00.00 /bin= /sh /usr/local/sbin/sshguard root 76237 0.0 0.0 7048 2616 - S Wed18 0:00.02 /bin= /sh /usr/local/libexec/sshg-fw-pf root 76311 0.0 0.0 7048 2700 - Is 20:27 0:00.01 /bin= /sh /usr/local/sbin/sshguard root 76313 0.0 0.0 7632 3140 - S 20:27 0:00.56 /usr/local/libexec/sshg-parser root 76314 0.0 0.0 6608 2548 - I 20:27 0:00.04 /usr/local/libexec/sshg-blocker -a 30 -p 120 -s root 76315 0.0 0.0 7048 2700 - I 20:27 0:00.00 /bin= /sh /usr/local/sbin/sshguard root 76316 0.0 0.0 7048 2684 - I 20:27 0:00.01 /bin= /sh /usr/local/libexec/sshg-fw-pf root 76477 0.0 0.0 7048 2700 - Is 03:07 0:00.01 /bin= /sh /usr/local/sbin/sshguard root 76480 0.0 0.0 7632 3132 - S 03:07 0:00.25 /usr/local/libexec/sshg-parser root 76481 0.0 0.0 6608 2548 - I 03:07 0:00.02 /usr/local/libexec/sshg-blocker -a 30 -p 120 -s root 76482 0.0 0.0 7048 2700 - I 03:07 0:00.00 /bin= /sh /usr/local/sbin/sshguard root 76483 0.0 0.0 7048 2684 - I 03:07 0:00.01 /bin= /sh /usr/local/libexec/sshg-fw-pf root 76495 0.0 0.0 7048 2700 - Is 23:53 0:00.01 /bin= /sh /usr/local/sbin/sshguard root 76497 0.0 0.0 7632 3132 - S 23:53 0:00.46 /usr/local/libexec/sshg-parser ... The sshguard service has a different command line, though otherwise the pro= cess group is similar to those above: root 54198 0.0 0.0 7048 2704 - Is 07:20 0:00.00 /bi= n/sh /usr/local/sbin/sshguard -b 30:/var/db/sshguard/blacklist.db -i /var/run/sshguard.pid root 54200 0.0 0.0 7632 3084 - I 07:20 0:00.00 /usr/local/libexec/sshg-parser root 54201 0.0 0.0 6608 2548 - I 07:20 0:00.00 /usr/local/libexec/sshg-blocker -a 30 -b 30:/var/db/sshguard/blacklist.db -i /var/run/sshguard.pid -p 120 -s 1800 root 54202 0.0 0.0 7048 2704 - I 07:20 0:00.00 /bi= n/sh /usr/local/sbin/sshguard -b 30:/var/db/sshguard/blacklist.db -i /var/run/sshguard.pid root 54203 0.0 0.0 7048 2684 - I 07:20 0:00.01 /bi= n/sh /usr/local/libexec/sshg-fw-pf --=20 You are receiving this mail because: You are the assignee for the bug.=