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 2217726 - Concurrent DELETE and PROPFIND breaks PROPFIND
Summary: Concurrent DELETE and PROPFIND breaks PROPFIND
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: httpd
Version: 9.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Luboš Uhliarik
QA Contact: Branislav Náter
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-06-27 03:07 UTC by Hisanobu Okuda
Modified: 2023-11-07 09:37 UTC (History)
3 users (show)

Fixed In Version: httpd-2.4.57-5.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-11-07 08:30:29 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-160855 0 None None None 2023-06-27 03:08:32 UTC
Red Hat Product Errata RHSA-2023:6403 0 None None None 2023-11-07 08:31:06 UTC

Description Hisanobu Okuda 2023-06-27 03:07:36 UTC
Description of problem:
Concurrent DELETE and PROPFIND breaks PROPFIND.
When executing DELETE and PROPFIND at the same time, PROPFIND may return an empty response.

Version-Release number of selected component (if applicable):
httpd-2.4.53-11.el9_2.5.x86_64

How reproducible:


Steps to Reproduce:
1. provide a container and install httpd:

	$ sudo subscription-manager register --force --username <red hat customer portal account name>
	$ podman rm -f rhel9test
	$ podman login registry.redhat.io
	$ podman run -it --privileged --cap-add=SYS_PTRACE --name rhel9test registry.redhat.io/ubi9/ubi
	# dnf install -y --enablerepo rhel-9-for-x86_64-appstream-rpms gdb httpd iproute procps-ng vim
	# dnf debuginfo-install -y glibc httpd

2. create config files:
	# vim /etc/httpd/conf.d/dav.conf
DavLockDB /var/www/davlock/db

Alias /dav /var/www/dav

<Directory /var/www/dav>
    LogLevel trace8
    Dav On
    DirectoryIndex disabled
</Directory>

	# vim /etc/httpd/conf.d/mpm.conf
ServerLimit             4
StartServers            1
MinSpareThreads         1
MaxSpareThreads         4
ThreadsPerChild         4
MaxRequestWorkers       1000

3. create dav contents:

	# mkdir /var/www/dav
	# mkdir /var/www/davlock
	# chmod 777 /var/www/dav /var/www/davlock
	# for i in x y z; do touch /var/www/dav/$i; chown apache:apache /var/www/dav/$i; done

4. start httpd:

	# nohup /usr/sbin/httpd -DFOREGROUND &

5. attach gdb:

	# ps -ef | grep httpd
	# gdb -p <largest PID of httpd processes>

6. set break points:

	(gdb) b unlink
	(gdb) b lstat

7. run PROPFIND on another shell:

	$ podman exec -it rhel9test /bin/bash
	curl "http://localhost/dav/" -X PROPFIND -i -H 'Depth:1' -d '<?xml version="1.0" encoding="utf-8"?><D:propfind xmlns:D="DAV:"><D:allprop/></D:propfind>'

8. run DELETE on another shell:

	$ podman exec -it rhel9test /bin/bash
	curl -v "http://localhost/dav/z" -X DELETE

9. enter 'c' to gdb prompt several times:

	(gdb) c
	(gdb) c
	(gdb) c
	(gdb) c
	(gdb) c
	(gdb) c
	(gdb) c
	(gdb) c
	(gdb) c

Then, you can observe the empty response and the error message in error_log:

# curl "http://localhost/dav/" -X PROPFIND -i -H 'Depth:1' -d '<?xml version="1.0" encoding="utf-8"?><D:propfind xmlns:D="DAV:"><D:allprop/></D:propfind>'
curl: (52) Empty reply from server

error_log:
[Wed Jun 07 08:04:32.922724 2023] [dav:error] [pid 354:tid 380] [client ::1:46944] Provider encountered an error while streaming a multistatus PROPFIND response.  [404, #0]

Actual results:


Expected results:


Additional info:

Comment 1 Joe Orton 2023-06-27 12:50:29 UTC
Thanks for the detailed report!

The problem is the stat() here is failing after reading the directory.
https://github.com/apache/httpd/blob/66254273e22a5b4051d15d7423b86a5d884b4ee5/modules/dav/fs/repos.c#L1613

We might be able to skip aborting the connection in the case of an ENOENT error here which seems reasonably harmless.

Comment 27 errata-xmlrpc 2023-11-07 08:30:29 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 (Moderate: httpd and mod_http2 security, bug fix, and enhancement update), 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/RHSA-2023:6403


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