Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 337181 - app-misc/clockywock _FORTIFY_SOURCE indicates presence of overflow
Summary: app-misc/clockywock _FORTIFY_SOURCE indicates presence of overflow
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: fortify-source
  Show dependency tree
 
Reported: 2010-09-13 23:44 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2011-02-09 19:57 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Build log (clockywock-0.2.3d:20100913-233314.log,4.66 KB, text/plain)
2010-09-13 23:45 UTC, Diego Elio Pettenò (RETIRED)
Details
Patch to fix buffer overflow (clockywock-0.2.3d-off-by-one.patch,477 bytes, patch)
2011-01-28 18:56 UTC, Kevin McCarthy (RETIRED)
Details | Diff
ebuild to apply the above patch (clockywock-0.2.3d-r1.ebuild,770 bytes, text/plain)
2011-01-28 18:57 UTC, Kevin McCarthy (RETIRED)
Details
Fixed to byte-assign the symbols instead of enlarging the buffer for \0 (clockywock-0.2.3d-off-by-one.patch,423 bytes, patch)
2011-01-29 17:11 UTC, Kevin McCarthy (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Elio Pettenò (RETIRED) gentoo-dev 2010-09-13 23:44:31 UTC
You're receiving this bug because the package in Summary has produced _FORTIFY_SOURCE related warnings indicating the presence of a sure overflow in a static buffer.

Even though this is not always an indication of a security problem it might even be. So please check this out ASAP.

By the way, _FORTIFY_SOURCE is disabled when you disable optimisation, so don't try finding out the cause using -O0.

Thanks,
Your friendly neighborhood tinderboxer
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2010-09-13 23:45:00 UTC
Created attachment 247195 [details]
Build log
Comment 2 Kevin McCarthy (RETIRED) gentoo-dev 2011-01-28 18:56:14 UTC
Created attachment 260943 [details, diff]
Patch to fix buffer overflow
Comment 3 Kevin McCarthy (RETIRED) gentoo-dev 2011-01-28 18:57:57 UTC
Created attachment 260945 [details]
ebuild to apply the above patch
Comment 4 Kevin McCarthy (RETIRED) gentoo-dev 2011-01-28 19:10:04 UTC
Uploaded an ebuild for app-misc/clockywock-0.2.3e with this patch in Bug #353082
Comment 5 Diego Elio Pettenò (RETIRED) gentoo-dev 2011-01-29 16:52:57 UTC
The code there seems funky, I'd suggest looking at the whole code to see why it is doing it that way at all, it might very well be that the mistake is in using snprintf() rather than byte-assigning.
Comment 6 Kevin McCarthy (RETIRED) gentoo-dev 2011-01-29 17:11:58 UTC
Created attachment 261021 [details, diff]
Fixed to byte-assign the symbols instead of enlarging the buffer for \0

The thought had occurred to me that the original author had intended to assign a single byte there instead of a string, but I didn't want to get too far into modifying his code, so I just enlarged the buffers. As it turns out, that is exactly what he had intended, so I removed the snprintf's and replaced them with byte-assignments in this new patch.
Comment 7 Kevin McCarthy (RETIRED) gentoo-dev 2011-01-31 15:17:52 UTC
I sent the patch for the FORTIFY_SOURCE problem upstream and a new version was created that no longer has the issue. I've uploaded a new e-build for clockywock-0.2.3f in bug 353082 and copied you on it Diego. If it looks OK, this bug should probably be closed.
Comment 8 Samuli Suominen gentoo-dev 2011-02-09 19:57:11 UTC
Fixed by 0.2.3f