Bug 1030030 - gets should be moved to its own manpage
gets should be moved to its own manpage
Product: Fedora
Classification: Fedora
Component: man-pages (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Peter Schiffer
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-11-13 13:32 EST by Dave Malcolm
Modified: 2014-01-02 10:35 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-01-02 10:35:38 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Dave Malcolm 2013-11-13 13:32:37 EST
Description of problem:
"gets" should never be used, but it is listed in the manpage on this box along with various safe functions.

If I may be melodramatic, this strikes me as akin to storing rat poison in a food cabinet, in the same style of packaging as the food, but with a post-it note on it saying "see warnings below".

I think such "never use this" functions should be quarantined into their own manpages, rather than listing them alongside sane functions.  At the same time, a more prominent "do not use" warning could be added higher up, so the NAME stanza of the new manpage could read:

       gets - Unsafe function; do not use (see fgets instead).

and the description could be updated to spell out the danger more clearly.

There could be link to CWE-242 (aka "Use of Inherently Dangerous Function"):

Ideally it could even list some examples of CVEs due to use of gets.

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

How reproducible:

Steps to Reproduce:
1. "man gets"

Actual results:
Unsafe "gets" listed alongside reasonable functions.

Expected results:
"gets" needs to be more clearly labelled as toxic.

Additional info:
Comment 1 Dave Malcolm 2013-11-13 14:23:20 EST
Patch sent upstream as:
Comment 2 Fedora End Of Life 2013-12-21 09:45:11 EST
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 3 Dave Malcolm 2014-01-02 10:35:38 EST
Patch applied to upstream git:


(followed by some tweaks), so should be in next upstream release.

Marking this as "CLOSED UPSTREAM"

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