Summary: | app-misc/clockywock _FORTIFY_SOURCE indicates presence of overflow | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Diego Elio Pettenò (RETIRED) <flameeyes> |
Component: | Current packages | Assignee: | No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it <maintainer-needed> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | hardened, signals |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 259417 | ||
Attachments: |
Build log
Patch to fix buffer overflow ebuild to apply the above patch Fixed to byte-assign the symbols instead of enlarging the buffer for \0 |
Description
Diego Elio Pettenò (RETIRED)
2010-09-13 23:44:31 UTC
Created attachment 247195 [details]
Build log
Created attachment 260943 [details, diff]
Patch to fix buffer overflow
Created attachment 260945 [details]
ebuild to apply the above patch
Uploaded an ebuild for app-misc/clockywock-0.2.3e with this patch in Bug #353082 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. 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.
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. Fixed by 0.2.3f |