RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1454571 - Sudo, with I/O Logging log_output option enabled, truncate output in case of cycle over standard input
Summary: Sudo, with I/O Logging log_output option enabled, truncate output in case of ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: sudo
Version: 7.4
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Radovan Sroka
QA Contact: Dalibor Pospíšil
URL: https://bugzilla.sudo.ws/show_bug.cgi...
Whiteboard:
Depends On:
Blocks: 1420851 1454677
TreeView+ depends on / blocked
 
Reported: 2017-05-23 05:23 UTC by Andrea Perotti
Modified: 2021-12-10 15:03 UTC (History)
5 users (show)

Fixed In Version: sudo-1.8.19p2-12.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1454677 (view as bug list)
Environment:
Last Closed: 2018-04-10 14:44:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
script to replicate the error (187 bytes, application/x-shellscript)
2017-05-23 05:23 UTC, Andrea Perotti
no flags Details
Tests failed on RHEL6 (2.20 KB, text/plain)
2017-05-23 05:24 UTC, Andrea Perotti
no flags Details
Tests passed on RHEL6 + upstream sudo (1.46 KB, text/plain)
2017-05-23 05:24 UTC, Andrea Perotti
no flags Details
Tests failes on RHEL7 (1.38 KB, text/plain)
2017-05-23 05:25 UTC, Andrea Perotti
no flags Details
Tests failed on RHEL7 + passed with upstream sudo (2.42 KB, text/plain)
2017-05-23 05:26 UTC, Andrea Perotti
no flags Details
proposed patch (6.29 KB, patch)
2017-05-23 08:25 UTC, Daniel Kopeček
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1510002 0 medium CLOSED Ensure that the command input (stdin) eating behaviour of Default log_input is documented 2021-12-10 15:22:59 UTC
Red Hat Product Errata RHBA-2018:0824 0 None None None 2018-04-10 14:44:42 UTC

Internal Links: 1510002

Description Andrea Perotti 2017-05-23 05:23:05 UTC
Created attachment 1281317 [details]
script to replicate the error

Description of problem:

There's an issue with sudo, that is truncating output in stdout file descriptor upon log_output (io logging) option usage.

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

Affected and tested versions:
* RHEL6 sudo-1.8.6p3-25.el6_8.x86_64 rpm
* RHEL7 sudo-1.8.6p7-21.el7_3.x86_64 rpm
* RHEL7 sudo-1.8.19p2-1.el7_3.x86_64 BETA rpm

NOT Affected version:
* RHEL6 upstream sudo-1.8.20-1.el6.x86_64 rpm (http://ftp.sudo.ws/pub/sudo/packages/Centos/6/sudo-1.8.20-1.el6.x86_64.rpm)


How reproducible:
Always

Steps to Reproduce:

Just run this script (also attacched):

#!/bin/bash
printf "usqpsinfra1\nusqpsinfra2\n" | while read node; do sudo echo $node; done

Actual results:
only usqpsinfra1 is outputted:

$ bash -x test
+ read node
+ printf 'usqpsinfra1\nusqpsinfra2\n'
+ sudo echo usqpsinfra1
usqpsinfra1
+ read node
$

Expected results:
$ bash -x test
+ read node
+ printf 'usqpsinfra1\nusqpsinfra2\n'
+ sudo echo usqpsinfra1
usqpsinfra1
+ read node
+ sudo echo usqpsinfra2
usqpsinfra2
+ read node
$

Comment 2 Andrea Perotti 2017-05-23 05:24:06 UTC
Created attachment 1281318 [details]
Tests failed on RHEL6

Comment 3 Andrea Perotti 2017-05-23 05:24:54 UTC
Created attachment 1281319 [details]
Tests passed on RHEL6 + upstream sudo

Comment 4 Andrea Perotti 2017-05-23 05:25:35 UTC
Created attachment 1281320 [details]
Tests failes on RHEL7

Comment 5 Andrea Perotti 2017-05-23 05:26:58 UTC
Created attachment 1281321 [details]
Tests failed on RHEL7 + passed with upstream sudo

Comment 7 Andrea Perotti 2017-05-23 05:37:21 UTC
Outputting to STDERR the issue is not present:

$ cat test
#!/bin/bash -x
printf "usqpsinfra1\nusqpsinfra2\n" | while read node; do sudo echo $node; done
printf "usqpsinfra1err\nusqpsinfra2err\n" | while read node; do sudo echo $node 0>&1; done

$ ./test
+ printf 'usqpsinfra1\nusqpsinfra2\n'
+ read node
+ sudo echo usqpsinfra1
usqpsinfra1
+ read node #### <--- MISSING usqpsinfra2
+ read node
+ printf 'usqpsinfra1err\nusqpsinfra2err\n'
+ sudo echo usqpsinfra1err
usqpsinfra1err
+ read node
+ sudo echo usqpsinfra2err
usqpsinfra2err
+ read node
$

Comment 8 Andrea Perotti 2017-05-23 05:41:52 UTC
This looks like the upstream bug:
https://bugzilla.sudo.ws/show_bug.cgi?id=786

Comment 12 Daniel Kopeček 2017-05-23 08:25:22 UTC
Created attachment 1281364 [details]
proposed patch

Comment 27 errata-xmlrpc 2018-04-10 14:44:23 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0824


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