Bug 240553
Summary: | vsftpd has a create/lock race condition which corrupts uploads | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Martin Poole <mpoole> | ||||||
Component: | vsftpd | Assignee: | Martin Nagy <mnagy> | ||||||
Status: | CLOSED ERRATA | QA Contact: | |||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | medium | ||||||||
Version: | 5.0 | CC: | brockn, mbarabas, mnagy, tao | ||||||
Target Milestone: | --- | Keywords: | Patch | ||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | RHSA-2008-0295 | Doc Type: | Bug Fix | ||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2008-05-21 14:16:39 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Description
Martin Poole
2007-05-18 13:06:11 UTC
Created attachment 154994 [details]
patch to handle write race condition on simultaneous upload
Created attachment 272591 [details]
new patch to handle write race condition
This patch also respects read lock on the file that is being overwritten.
Use RHTS test case /CoreOS/vsftpd/regressions/testbug_para_upload for testing. This request was evaluated by Red Hat Product Management for inclusion, but this component is not scheduled to be updated in the current Red Hat Enterprise Linux release. This request will be reviewed for a future Red Hat Enterprise Linux release. Fixed in fedora/rawhide (vsftpd-2.0.5-21.fc9). Re-proposing for 5.2 since vsftpd was approved for 5.2. This request was evaluated by Red Hat Product Management for inclusion, but this component is not scheduled to be updated in the current Red Hat Enterprise Linux release. This request will be reviewed for a future Red Hat Enterprise Linux release. This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release. This will be fixed in vsftpd-2.0.5-10.el5 Correction: This will be fixed in vsftpd-2.0.5-11.el5 *** Bug 432526 has been marked as a duplicate of this bug. *** I don't think your patch is fixing the actual problem. The actual problem is that vsftp is opening the file incorrectly. It should not be using the O_TRUNC and O_APPEND flags. See my fix in Bug 432526. int vsf_sysutil_create_overwrite_file(const char* p_filename) { return open(p_filename, O_CREAT | O_TRUNC | O_WRONLY | O_APPEND | O_NONBLOCK, tunable_file_open_mode); } An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2008-0295.html Closing based on latest errata. Please re-open if necessary. Internal Status set to 'Resolved' Status set to: Closed by Tech Resolution set to: 'RHEL 5.2' This event sent from IssueTracker by balkov issue 120992 |