Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1162571

Summary: libbsd: fgetln, fgetwln implementations are broken
Product: [Fedora] Fedora Reporter: Florian Weimer <fweimer>
Component: libbsdAssignee: Eric Smith <spacewar>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: high    
Version: rawhideCC: jgrulich, qe-baseos-daemons, rvokal, spacewar
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: libbsd-0.8.3-1.fc25 libbsd-0.8.3-1.fc24 libbsd-0.8.3-2.el6 libbsd-0.8.3-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1032573 Environment:
Last Closed: 2016-12-31 06:50:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Florian Weimer 2014-11-11 11:07:56 UTC
The implementation is broken because it is not thread-safe and does not really follow the behavior of the BSD function (the returned string could be destroyed by independent read operations on other streams).

I couldn't find any external users of these functions (as defined in libbsd), so it's probably safer to remove these functions.

fparseln could be implemented directly on top of getline because it does not return the pointer obtained from fgetln.

Comment 1 Jaroslav Reznik 2015-03-03 16:29:25 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22

Comment 2 Eric Smith 2015-03-06 04:54:38 UTC
It would be best if this was addressed by upstream. I'll inquire about it. Aside from that, patches are welcome.

Comment 3 Fedora End Of Life 2016-07-19 20:20:40 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 4 Fedora Update System 2016-12-23 07:20:27 UTC
libbsd-0.8.3-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-d3e562bb52

Comment 5 Fedora Update System 2016-12-23 07:30:03 UTC
libbsd-0.8.3-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-5c3d057783

Comment 6 Fedora Update System 2016-12-23 07:36:05 UTC
libbsd-0.8.3-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-04bc9dd81d

Comment 7 Fedora Update System 2016-12-23 08:17:16 UTC
libbsd-0.8.3-2.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-e3e50897ac

Comment 8 Fedora Update System 2016-12-23 08:21:18 UTC
libbsd-0.8.3-2.el5 has been submitted as an update to Fedora EPEL 5. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-ce45574ab6

Comment 9 Fedora Update System 2016-12-23 14:16:29 UTC
libbsd-0.8.3-2.el5 has been pushed to the Fedora EPEL 5 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-ce45574ab6

Comment 10 Fedora Update System 2016-12-23 14:18:25 UTC
libbsd-0.8.3-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-04bc9dd81d

Comment 11 Fedora Update System 2016-12-23 14:19:18 UTC
libbsd-0.8.3-2.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-e3e50897ac

Comment 12 Fedora Update System 2016-12-23 14:53:38 UTC
libbsd-0.8.3-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-d3e562bb52

Comment 13 Fedora Update System 2016-12-23 15:22:29 UTC
libbsd-0.8.3-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-5c3d057783

Comment 14 Fedora Update System 2016-12-31 06:50:15 UTC
libbsd-0.8.3-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 15 Fedora Update System 2016-12-31 08:23:46 UTC
libbsd-0.8.3-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2018-04-09 18:06:16 UTC
libbsd-0.8.3-2.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.

Comment 17 Fedora Update System 2018-04-09 19:00:07 UTC
libbsd-0.8.3-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.