bugzilla-daemon at mindrot.org
2014-Aug-22 14:31 UTC
[Bug 2263] New: sshd privsep monitor process doesn't handle SIGXFSZ signal
https://bugzilla.mindrot.org/show_bug.cgi?id=2263 Bug ID: 2263 Summary: sshd privsep monitor process doesn't handle SIGXFSZ signal Product: Portable OpenSSH Version: 6.6p1 Hardware: All OS: Linux Status: NEW Severity: normal Priority: P5 Component: sshd Assignee: unassigned-bugs at mindrot.org Reporter: plautrba at redhat.com FreeIPA allocates a random uid range for its use between 200k and 2G. If an user with uid like 1280000008 logs in, the lastlog file size jumps to almost 400G as lastlog is defined as a sparse file. The problem is when PAM with pam_limit module is used and the user has fsize limit set. When sshd monitor process tries to write lastlog file, it's already limited by pam_limit as a pam session is opened. And when the lastlog file is bigger than the fsize limit, the process gets SIGXFSZ signal and silently dies. In other cases when lastlog entry can't be written, sshd logs the problem and continues. Therefore I think that SIGXFSZ signal could be ignored in the monitor process. atomicio() would set correctly errno and lastlog_write_entry() would log the file size problem. -- You are receiving this mail because: You are watching the assignee of the bug.
bugzilla-daemon at mindrot.org
2014-Aug-22 17:09 UTC
[Bug 2263] sshd privsep monitor process doesn't handle SIGXFSZ signal
https://bugzilla.mindrot.org/show_bug.cgi?id=2263 Damien Miller <djm at mindrot.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned-bugs at mindrot.org |djm at mindrot.org CC| |djm at mindrot.org --- Comment #1 from Damien Miller <djm at mindrot.org> --- Created attachment 2461 --> https://bugzilla.mindrot.org/attachment.cgi?id=2461&action=edit Ignore SIGXFSZ in preauth monitor -- You are receiving this mail because: You are watching someone on the CC list of the bug. You are watching the assignee of the bug.
bugzilla-daemon at mindrot.org
2014-Aug-22 17:10 UTC
[Bug 2263] sshd privsep monitor process doesn't handle SIGXFSZ signal
https://bugzilla.mindrot.org/show_bug.cgi?id=2263 Damien Miller <djm at mindrot.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |FIXED Blocks| |2226 --- Comment #2 from Damien Miller <djm at mindrot.org> --- This will be in openssh-6.7 -- You are receiving this mail because: You are watching someone on the CC list of the bug. You are watching the assignee of the bug.
bugzilla-daemon at mindrot.org
2014-Aug-26 14:34 UTC
[Bug 2263] sshd privsep monitor process doesn't handle SIGXFSZ signal
https://bugzilla.mindrot.org/show_bug.cgi?id=2263 Petr Lautrbach <plautrba at redhat.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED |--- --- Comment #3 from Petr Lautrbach <plautrba at redhat.com> --- Unfortunatelly, it doesn't fix the issue. lastlog is written in postauth phase so SIGXFSZ has to be ignored there. -- You are receiving this mail because: You are watching the assignee of the bug. You are watching someone on the CC list of the bug.
bugzilla-daemon at mindrot.org
2014-Aug-26 14:39 UTC
[Bug 2263] sshd privsep monitor process doesn't handle SIGXFSZ signal
https://bugzilla.mindrot.org/show_bug.cgi?id=2263 --- Comment #4 from Petr Lautrbach <plautrba at redhat.com> --- Created attachment 2462 --> https://bugzilla.mindrot.org/attachment.cgi?id=2462&action=edit Ignore SIGXFSZ in postauth monitor child Using this patch, the following message is logged in the described scenario: Aug 26 16:31:14 hulk.w.lan sshd[27852]: lastlog_write_entry: Error writing to /var/log/lastlog: File too large Reproducer: - create an user with uid 1280000008 - set openssh to use pam - set pam to use pam_limit.so session required pam_limits.so - add following line to /etc/security/limits.conf user hard fsize 1024000 - try to login as user -- You are receiving this mail because: You are watching the assignee of the bug. You are watching someone on the CC list of the bug.
bugzilla-daemon at mindrot.org
2014-Aug-26 14:47 UTC
[Bug 2263] sshd privsep monitor process doesn't handle SIGXFSZ signal
https://bugzilla.mindrot.org/show_bug.cgi?id=2263 Petr Lautrbach <plautrba at redhat.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #2462|0 |1 is obsolete| | --- Comment #5 from Petr Lautrbach <plautrba at redhat.com> --- Created attachment 2463 --> https://bugzilla.mindrot.org/attachment.cgi?id=2463&action=edit Ignore SIGXFSZ in postauth monitor child -- You are receiving this mail because: You are watching someone on the CC list of the bug. You are watching the assignee of the bug.
bugzilla-daemon at mindrot.org
2014-Aug-26 18:12 UTC
[Bug 2263] sshd privsep monitor process doesn't handle SIGXFSZ signal
https://bugzilla.mindrot.org/show_bug.cgi?id=2263 Damien Miller <djm at mindrot.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution|--- |FIXED --- Comment #6 from Damien Miller <djm at mindrot.org> --- applied - thanks -- You are receiving this mail because: You are watching the assignee of the bug. You are watching someone on the CC list of the bug.
bugzilla-daemon at mindrot.org
2014-Oct-07 21:00 UTC
[Bug 2263] sshd privsep monitor process doesn't handle SIGXFSZ signal
https://bugzilla.mindrot.org/show_bug.cgi?id=2263 Damien Miller <djm at mindrot.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #7 from Damien Miller <djm at mindrot.org> --- Close all bugs left open from 6.6 and 6.7 releases. -- You are receiving this mail because: You are watching the assignee of the bug. You are watching someone on the CC list of the bug.
Possibly Parallel Threads
- [Bug 983] Required authentication
- [Bug 2166] New: sshd logs unnecessary messages if some of default host keys doesn't exist
- [Bug 2011] sandbox selection needs some kind of fallback mechanism
- [Bug 2332] New: Show more secure fingerprints than MD5 (e.g. SHA256) in ssh and ssh-keygen
- [Bug 2133] New: scp failes between two ends using password authentication