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 2160380 - new libcap-ng functionality in rsyslog can't be turned off, is totally undocumented, breaks stuff
Summary: new libcap-ng functionality in rsyslog can't be turned off, is totally undocu...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: rsyslog
Version: CentOS Stream
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Attila Lakatos
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-01-12 08:09 UTC by Jonathan Kamens
Modified: 2024-02-19 18:27 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-08-01 12:45:22 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-144913 0 None None None 2023-01-12 08:12:43 UTC
Red Hat Issue Tracker SECENGSP-4962 0 None None None 2023-01-12 08:12:46 UTC

Description Jonathan Kamens 2023-01-12 08:09:50 UTC
As per bug 2127404, version rsyslog-8.2102.0-107.el9, which just came out, has code in it to use libcap to drop capabilities on startup.

Problems:

* There doesn't appear to be any way to turn this off.
* The behavior is completely undocumented so the only way you can find out it's doing this is to find the one-line note about it in the RPM changelog.
* It is preventing rsyslog from writing to log files owned by other users.

The last bullet point above is the sticking point for me. INN stores log files in /var/log/news, not /var/log, and they're owned by news, not by root. This is necessary because the nightly job that INN runs to clean up log files runs as news, not root, and it needs to be able to manipulate these log files in ways it would not be able to do if they were owned by root.

There are undoubtedly other similar user cases which this change is going to be problematic for.

Please make it possible to turn this functionality off entirely or at least to configure the capability dropping to allow rsyslog to continue to be able to write to files owned by other users.

Comment 1 Attila Lakatos 2023-01-13 09:15:54 UTC
This was a security enhancement, so that's why there is no way to turn it off.

I gave a second thought to the list of enabled capabilities and modified it. Could you try out the latest scratch-build and let me know if that helps your use case?
Scratch-build: https://kojihub.stream.rdu2.redhat.com/koji/taskinfo?taskID=1782475

Comment 2 Jonathan Kamens 2023-01-13 14:59:01 UTC
>This was a security enhancement, so that's why there is no way to turn it off.

SELinux is a security enhancement, and yet it can be disabled.

Access permissions on my web server are a security enhancement, and yet I can turn them on or off as desired.

File access permissions are a security enhancement, and yet if I want I can make all of my files and directories mode 0777.

Maybe this is something that should be enabled by default—though not if the default configuration is going to break things!—but sysadmins should have the option of configuring more permissive behavior if they need it and understand the risks.

That's true unless the permissions you're dropping are absolutely positively never going to be needed by rsyslog for anything, which clearly is not the case here. Perhaps you've fixed that with the changes you just made, but I can't know that for certain, since as I mentioned you haven't documented this change anywhere.

>Could you try out the latest scratch-build and let me know if that helps your use case?
>Scratch-build: https://kojihub.stream.rdu2.redhat.com/koji/taskinfo?taskID=1782475

That is presumably a Red Hat internal Koji server and not accessible to me, at least not at that host name:

$ host kojihub.stream.rdu.redhat.com
Host kojihub.stream.rdu.redhat.com not found: 3(NXDOMAIN)

Comment 3 Jonathan Kamens 2023-02-12 20:43:52 UTC
Some progress on this is required.

As noted above, I cannot test the test build you asked me to test because you sent a link to an internal Red Hat server.

Comment 4 pascal.tempier 2023-03-10 18:54:41 UTC
@alakatos

Please see the issue i did open here : https://bugzilla.redhat.com/show_bug.cgi?id=2127404
This is actually a security regression as rsyslog somehow now needs more capabilities than before to work.

I was dropping capabilities via docker in the previous version.
Now in the last version, i need to first provide more capabilities so that rsyslog can then drop them, else it won't work.
At least i hope it drops them, i didn't checked the new source code.

Comment 5 Jonathan Kamens 2023-03-28 18:10:57 UTC
My issue appears to have been fixed via the change committed to address Bug 2158659. Pity no one from Red Hat could be bothered to post a comment to that effect here.

Comment 6 Attila Lakatos 2023-08-01 12:45:22 UTC
The problem has been fixed via https://bugzilla.redhat.com/show_bug.cgi?id=2158659. Closing it.


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