After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 782952 - Using grep in Games do not work with a filename --ignore-case
Using grep in Games do not work with a filename --ignore-case
Status: RESOLVED FIXED
Product: gnome-games
Classification: Core
Component: general
unspecified
Other Linux
: Normal minor
: ---
Assigned To: GNOME Games maintainers
GNOME Games maintainers
Depends on:
Blocks:
 
 
Reported: 2017-05-22 13:06 UTC by misc
Modified: 2017-05-22 13:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix option injection (1.23 KB, patch)
2017-05-22 13:08 UTC, misc
committed Details | Review

Description misc 2017-05-22 13:06:52 UTC
While discussing on irc, it was found that gnome Games is running grep with a set of parameters, one being the filename. While I do not know if there is possibility  of reading someone else file this way (but cannot exclude it), that mean that someone creating a file "--ignore-case" with the right mime types would make gnome games freeze, since Games would run "grep foo --ignore-case", and gnu grep do not stop handling options after the text have been provided.

I didn't found any code exec path, so I didn't request a CVE.

Here is a patch (untested) that should prevent the issue in the future.
Comment 1 misc 2017-05-22 13:08:01 UTC
Created attachment 352352 [details] [review]
Fix option injection
Comment 2 Adrien Plazas 2017-05-22 13:30:05 UTC
Review of attachment 352352 [details] [review]:

LGTM, thanks.