Bug 1030030 - gets should be moved to its own manpage
Summary: gets should be moved to its own manpage
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: man-pages
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Peter Schiffer
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-13 18:32 UTC by Dave Malcolm
Modified: 2014-01-02 15:35 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-02 15:35:38 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Dave Malcolm 2013-11-13 18:32:37 UTC
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:

NAME
       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"):
http://cwe.mitre.org/data/definitions/242.html

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

Version-Release number of selected component (if applicable):
man-pages-3.35-2.fc17.noarch

How reproducible:
100% 

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 19:23:20 UTC
Patch sent upstream as:
  http://thread.gmane.org/gmane.linux.man/4626

Comment 2 Fedora End Of Life 2013-12-21 14:45:11 UTC
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 15:35:38 UTC
Patch applied to upstream git:

  http://git.kernel.org/cgit/docs/man-pages/man-pages.git/commit/?id=beef2770927a56dc3c16a36bed938574df285637

(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.