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 2125311 - rsync-daemon fail on 3.1.3
Summary: rsync-daemon fail on 3.1.3
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: rsync
Version: 8.6
Hardware: x86_64
OS: Linux
urgent
medium
Target Milestone: rc
: ---
Assignee: Michal Ruprich
QA Contact: Ondrej Mejzlik
URL:
Whiteboard:
: 2153814 (view as bug list)
Depends On:
Blocks: 2139118 2139119
TreeView+ depends on / blocked
 
Reported: 2022-09-08 15:10 UTC by cstackpole
Modified: 2023-01-26 19:51 UTC (History)
6 users (show)

Fixed In Version: rsync-3.1.3-19.el8_7.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2139118 2139119 (view as bug list)
Environment:
Last Closed: 2023-01-26 09:20:15 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-133556 0 None None None 2022-09-08 15:25:59 UTC

Description cstackpole 2022-09-08 15:10:44 UTC
Description of problem:
rsync-daemon-3.1.3-14.el8_6.3.noarch.rpm has an issue with the --delete option and the --filter option when used at the same time. This doesn't seem to be an issue with the client, just the rsync daemon on the server side.

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

Red Hat Enterprise Linux release 8.6 (Ootpa)
rsync-daemon-3.1.3-14.el8_6.3.noarch.rpm


How reproducible: Every time we've tested on every host we've tested.


Steps to Reproduce:
1. Install rsync-daemon-3.1.3-14.el8_6.3 on server (192.168.1.1)
2. From a client, run this: /usr/bin/rsync -a --delete --filter '-x system.*' / 192.168.1.1::some/test/dir/

Actual results:

ERROR: rejecting excluded file-list name: etc/X11/mwm/system.mwmrc
rsync error: protocol incompatibility (code 2) at flist.c(912) [receiver=3.1.3]
rsync error: protocol incompatibility (code 2) at io.c(1649) [generator=3.1.3]

Removing either --delete or --filter and rsync runs. (You can add other flags too, I just simplified it as much as possible for bug report.) And it doesn't matter the file. Remove system.mwmrc and it will fail on the very next matching file.

Expected results:

It should work without error.

Additional info:

On the server run this: dnf downgrade rsync-daemon-3.1.3-14.el8_6.2

And watch it work. Upgrade to rsync-daemon-3.1.3-14.el8_6.3 and watch it fail. Client version doesn't seem to matter.

This seems relevant to me:
https://download.samba.org/pub/rsync/NEWS#3.1.3

2021-09-27 - Tomas Korbar <tkorbar> - 3.1.3-13
- Resolves: #1907443 - Read-only files that have changed xattrs fail to allow xattr changes

This is a big deal for us, but with a downgrade to an older version as a workaround we will be fine for a while so I marked as medium severity. Feel free to adjust. :-)

Thanks!

Comment 1 cstackpole 2022-09-08 15:14:23 UTC
Seems this might be the upstream for the breaking patch (simply trying to add relevant information):
https://github.com/WayneD/rsync/issues/208

Comment 2 Michal Ruprich 2022-09-08 16:49:22 UTC
Hi,

thanks for the bug report. This is most probably a result of a fix for a recent CVE. Can you please try to run you command with --old-args option? It should be a workaround for these issues.

Thanks and regards,
Michal

Comment 3 cstackpole 2022-09-08 17:06:03 UTC
Greetings,
Adding `--old-args` after the `-a` flag did not make a difference.
Thanks!

Comment 4 Michal Ruprich 2022-09-08 20:02:04 UTC
Thanks,

can you please try this test package please:

https://people.redhat.com/mruprich/rsync-3.1.3-14.el8_6.4.x86_64.rpm
https://people.redhat.com/mruprich/rsync-daemon-3.1.3-14.el8_6.4.noarch.rpm

These contain some possible fixes from the Upstream.

Thanks,
Michal

Comment 5 cstackpole 2022-09-08 20:33:53 UTC
Sorry. No go. Same error. I updated both server and client.
Thanks!

Comment 6 Michal Ruprich 2022-10-21 12:37:43 UTC
Hi,
sorry for longer absence here, can you please try this update? This helped me in RHEL7 with the same issue:

https://people.redhat.com/mruprich/rsync-daemon-3.1.3-14.el8_6.5.noarch.rpm
https://people.redhat.com/mruprich/rsync-3.1.3-14.el8_6.5.x86_64.rpm

Thanks,
Michal

Comment 7 cstackpole 2022-10-21 13:40:07 UTC
Thank you for the update. Unfortunately, exact same error. I updated both server and client.

Comment 8 cstackpole 2022-10-21 13:40:59 UTC
I meant to post this as verification.
$ rpm -q rsync
rsync-3.1.3-14.el8_6.5.x86_64

Comment 9 Michal Ruprich 2022-10-24 12:02:41 UTC
Thanks, I was finally able to reproduce this and it works fine on 3.2.7 version that is currently being released in Fedora. So there is a fix I just need to find it. Thanks for testing, I am going to come up with fix soon.

Comment 12 Michal Ruprich 2022-11-01 09:28:22 UTC
Hi,

I am sorry to bother you with testing, I just want to make sure this works. I was finally able to find what was wrong with the filtering and that it only occurred in the 3.1.3 version of rsync. The -x filter was not properly added as seen with --debug=all4:

...
[client] add_rule(- user.*)
...

This is wrong and should be like this:
...
[client] add_rule(-x user.*)
...

I found a path upstream that fixes this(at least for my reproducer with -x user.* but it should work for your usecase as well).

So hopefully for the last time, I would like to ask you to test this package:
https://people.redhat.com/mruprich/rsync-3.1.3-14.el8_6.6.x86_64.rpm
https://people.redhat.com/mruprich/rsync-daemon-3.1.3-14.el8_6.6.noarch.rpm

Thank you,
Michal

Comment 15 cstackpole 2022-11-01 13:59:00 UTC
Huzzah! It works! Thank you so much for all your time and effort getting this fixed. It helps me out quite a bit. I really appreciate your help Michal!

I will keep an eye out for the 3.1.3-14.el8_6.6 release.
Thanks!

Comment 22 cstackpole 2022-12-23 19:22:51 UTC
Greetings,
We got bit by this again... worse, the migration had already occurred to 8.7 so it made it even more challenging to revert back. Fortunately, I knew where to get the 3.1.3-14.el8_6.2 rpms. Just to see if things were moving along but hadn't landed in RH yet, I pulled rsync-3.1.3-19.el8.1.x86_64 from CentOS 8 Stream. Still same error as before. Which is a shame because I see that it updated earlier this month:
http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/Packages/

Any update on when we can get this fix pushed through please? 
Thank you!

Comment 23 cstackpole 2022-12-23 19:31:16 UTC
DAH! I forgot to update the client when I was testing the stream version... I take that back...

rsync-3.1.3-19.el8.1.x86_64 DOES work! Huzzah!

Any idea when that might land in RHEL 8.7?

Thank you so much!

Comment 24 cstackpole 2023-01-05 17:36:15 UTC
Greetings @mruprich ,
It's been a month since you pushed this patch release in Stream:
https://gitlab.com/redhat/centos-stream/rpms/rsync/-/commit/e5461b77ec2fdf84da618afdb9d75ab13af4fa24

Any update on when I can get this on my RHEL 8.7 systems?

Thank you!

Comment 25 Michal Ruprich 2023-01-09 08:50:38 UTC
It should be out within a week or so.

Comment 26 Michal Ruprich 2023-01-26 09:12:52 UTC
*** Bug 2153814 has been marked as a duplicate of this bug. ***

Comment 27 Michal Ruprich 2023-01-26 09:20:15 UTC
This bug should now be fixed by rsync-3.1.3-19.el8_7.1 and rsync-3.1.3-14.el8_6.4. Both of these erratas are shipped. I am closing this issue, feel free to reopen should the problem re-appear.

Comment 28 cstackpole 2023-01-26 14:37:51 UTC
Thanks @mruprich ! We've been testing rsync-3.1.3-19.el8_7.1 this week and things are looking good. Haven't found an issue yet. Thanks for all your help on this! It's much appreciated!

Comment 29 Michal Ruprich 2023-01-26 14:40:44 UTC
Thank you for the patience, this was a weird one to solve. Hopefully this was the last time we saw this error.

Regards,
Michal


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