Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 340905 - app-editors/dav _FORTIFY_SOURCE indicates presence of overflow
Summary: app-editors/dav _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-10-14 01:06 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2011-04-05 18:22 UTC (History)
2 users (show)

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


Attachments
Build log (dav-0.8.5:20101013-185831.log,3.58 KB, text/plain)
2010-10-14 01:07 UTC, Diego Elio Pettenò (RETIRED)
Details
buffer overflow fix (dav-0.8.5-davrc-buffer-overflow.patch,246 bytes, patch)
2011-01-29 19:27 UTC, Kevin McCarthy (RETIRED)
Details | Diff
New ebuild to apply buffer overflow patch (dav-0.8.5-r1.ebuild,1.02 KB, text/plain)
2011-01-29 19:28 UTC, Kevin McCarthy (RETIRED)
Details

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-10-14 01:06:52 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-10-14 01:07:14 UTC
Created attachment 250507 [details]
Build log
Comment 2 Kevin McCarthy (RETIRED) gentoo-dev 2011-01-29 19:27:39 UTC
Created attachment 261032 [details, diff]
buffer overflow fix
Comment 3 Kevin McCarthy (RETIRED) gentoo-dev 2011-01-29 19:28:13 UTC
Created attachment 261034 [details]
New ebuild to apply buffer overflow patch
Comment 4 Kevin McCarthy (RETIRED) gentoo-dev 2011-01-29 19:34:15 UTC
Don't know how the original author let this one slip by. When reading the .davrc file he defines a buffer of 80 bytes, then tries to fgets 200 bytes into it. Everything works OK so long as there aren't any lines in the file > 80 bytes long, but it overflows the buffer if there are.

While not the most robust fix, I've just changed the buffer size to 200 so fgets can't overflow it. Unfortunately, this means that the maximum length of a line in .davrc is 200 bytes. But, anything longer will just be truncated to 200 bytes instead of causing a buffer overflow now.
Comment 5 Kevin McCarthy (RETIRED) gentoo-dev 2011-04-05 18:22:20 UTC
Patch added to portage as app-editors/dav-0.8.5-r1.