Red Hat Bugzilla – Bug 1030030
gets should be moved to its own manpage
Last modified: 2014-01-02 10:35:38 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):
Steps to Reproduce:
1. "man gets"
Unsafe "gets" listed alongside reasonable functions.
"gets" needs to be more clearly labelled as toxic.
Patch sent upstream as:
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.
Patch applied to upstream git:
(followed by some tweaks), so should be in next upstream release.
Marking this as "CLOSED UPSTREAM"