Bug 1099922 - Unchecked buffer fill by gf_readline in gf_history_changelog_next_change
Summary: Unchecked buffer fill by gf_readline in gf_history_changelog_next_change
Keywords:
Status: CLOSED EOL
Alias: None
Product: GlusterFS
Classification: Community
Component: core
Version: 3.5.0
Hardware: All
OS: All
unspecified
medium
Target Milestone: ---
Assignee: bugs@gluster.org
QA Contact:
URL:
Whiteboard:
Depends On: 1174017
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-21 14:07 UTC by Keith Schincke
Modified: 2016-06-17 15:57 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
: 1174017 (view as bug list)
Environment:
Last Closed: 2016-06-17 15:57:32 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)
maxlen check addition (354 bytes, patch)
2014-05-21 14:07 UTC, Keith Schincke
no flags Details | Diff

Description Keith Schincke 2014-05-21 14:07:11 UTC
Created attachment 898015 [details]
maxlen check addition

Description of problem:
A gf_history_changelog_next_change() calls gf_readline() to fill a buffer without checking buffer size. The size of maxlen is not verified to be less than the lenght of buffer. This could result in the over filling of buffer of maxlen is greater than PATH_MAX

size = gf_readline (tracker_fd, buffer, maxlen);

Version-Release number of selected component (if applicable):
3.5
https://github.com/gluster/glusterfs/blame/master/xlators/features/changelog/lib/src/gf-history-changelog.c#L173


How reproducible:
100%

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:
Check the size of maxlen to be less than PATH_MAX and return a fail code as needed. 

See attached patch. 

Additional info:

Comment 1 Niels de Vos 2014-12-14 20:38:33 UTC
Bug 1174017 has been filed to get the change in the master branch. After its inclusion, a backpoprt can be submitted for release-3.5.

Comment 2 Niels de Vos 2016-06-17 15:57:32 UTC
This bug is getting closed because the 3.5 is marked End-Of-Life. There will be no further updates to this version. Please open a new bug against a version that still receives bugfixes if you are still facing this issue in a more current release.


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