Bug 1068697 - Before reading/writing from stdin/stdout, turn off O_NONBLOCK please, for robustness reasons
Summary: Before reading/writing from stdin/stdout, turn off O_NONBLOCK please, for rob...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: bash
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Siteshwar Vashisht
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-21 17:09 UTC by Lennart Poettering
Modified: 2017-04-27 20:55 UTC (History)
2 users (show)

Fixed In Version: bash-4.4.12-4.fc26
Clone Of:
Environment:
Last Closed: 2017-04-27 20:55:08 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Lennart Poettering 2014-02-21 17:09:29 UTC
bash should probably undo O_NONBLOCK mode on stdin/stdout before reading/writing to it, for robustness reasons. zsh does this already.

This was noticed in this bug, where systemd-nspawn turned O_NONBLOCK on but forgot to turn it off again:

https://bugs.freedesktop.org/show_bug.cgi?id=70622

I fixed this in systemd-nspawn now, but it would be good if bash would protect itself from this, given that abnormal nspawn exits will still leave the non-block flag on.

Comment 1 Jaroslav Reznik 2015-03-03 15:30:49 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 3 Jan Kurik 2016-07-26 05:05:52 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 25 development cycle.
Changing version to '25'.

Comment 4 Siteshwar Vashisht 2017-01-22 19:55:31 UTC
I initiated a discussion here https://lists.gnu.org/archive/html/bug-bash/2017-01/msg00039.html

Comment 5 Siteshwar Vashisht 2017-02-13 06:47:03 UTC
Fixed in this bash snapshot http://git.savannah.gnu.org/cgit/bash.git/commit/?h=devel&id=bc371472444f900d44050414e3472f7349a7aec7

Comment 6 Fedora Update System 2017-04-26 13:02:17 UTC
bash-4.4.12-4.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-075ed3aef8

Comment 7 Fedora Update System 2017-04-26 21:53:15 UTC
bash-4.4.12-4.fc26 has been pushed to the Fedora 26 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-2017-075ed3aef8

Comment 8 Fedora Update System 2017-04-27 20:55:08 UTC
bash-4.4.12-4.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.


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