Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1630855 - cronie silently terminates on SIGPIPE [NEEDINFO]
cronie silently terminates on SIGPIPE
Status: NEW
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: cronie (Show other bugs)
6.10
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Marcel Plch
qe-baseos-daemons
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2018-09-19 08:45 EDT by Filip Krska
Modified: 2018-10-09 04:41 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
mkolaja: needinfo? (bgollahe)
mkolaja: needinfo? (fkrska)


Attachments (Terms of Use)
Backport of upstream patch (8.54 KB, patch)
2018-10-05 11:25 EDT, Marcel Plch
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2746821 None None None 2018-09-19 09:12 EDT

  None (edit)
Description Filip Krska 2018-09-19 08:45:20 EDT
Description of problem:

During SMB authentication the main cronie process terminates so no other jobs are executed after a single auth fault.

Before 1.4.7 and patch

https://github.com/cronie-crond/cronie/commit/ee4cbe7659ede3f61db18cc922ee0e27268a8579?diff=unified

cronie was known to be overly sensitive to SIGPIPE.

Version-Release number of selected component (if applicable):

cronie-1.4.4-16.el6_8.2

How reproducible:

Often in customer's environment

Steps to Reproduce:
1. setup crontab for user in SMB domain
2. observe SMB auth failure

Actual results:

main cronie process terminates on SIGPIPE, no record in logs

Expected results:

cronie logs the auth failure and recovers, continues serving subsequent jobs

Additional info:

messages events preceding the cronie crash:

[2018/07/29 19:39:09.683477,  0] auth/pampass.c:589(smb_pam_account)
  smb_pam_account: PAM: UNKNOWN PAM ERROR (4) during Account Management for User: netadmin
[2018/07/29 19:39:09.683612,  0] auth/pampass.c:797(smb_pam_accountcheck)
  smb_pam_accountcheck: PAM: Account Validation Failed - Rejecting User netadmin!
[2018/07/29 19:39:09.684137,  0] rpc_server/srv_pipe.c:835(pipe_gssapi_verify_final)
 rpc_server/srv_pipe.c:835: failed to obtain the server info for authenticated user: NT_STATUS_ACCESS_DENIED
[2018/07/29 19:39:09.684270,  0] rpc_server/srv_pipe.c:1608(api_pipe_alter_context)

Jul 29 19:39:01 server CROND[26999]: (smbuser) CMD (some cmd)
Jul 29 19:52:28 server crond[3308]: (CRON) STARTUP (1.4.4)             (manual)

in cronie strace:

...
connect(7, {sa_family=AF_LOCAL, sun_path="/var/lib/samba/winbindd_privileged/pipe"}, 110) = 0 <0.000132>
...
write(7, "0\10 ...0\0\0smbuser\0\0\...
--- SIGPIPE
Comment 1 Marcel Plch 2018-09-27 11:22:53 EDT
Could you please provide a reproducer more specific than the one described above?

I'm a Cronie maintainer but I have no experience with Samba tools, so a specific reproducer would really help me debug this issue.
Comment 3 Marcel Plch 2018-10-05 11:25 EDT
Created attachment 1490880 [details]
Backport of upstream patch

I have managed to reproduce this using:
# killall -SIGPIPE crond

I've tried and backported the upstream patch.
After the backport, I have not been able to reproduce the crash.

I'm attaching the patch.

Note You need to log in before you can comment on or make changes to this bug.