Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 259272 - net-proxy/squidguard-1.3-r4 and -1.4 vsprintf overflow (patch)
Summary: net-proxy/squidguard-1.3-r4 and -1.4 vsprintf overflow (patch)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Network Proxy Developers (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-16 20:12 UTC by emerald
Modified: 2009-04-26 12:50 UTC (History)
1 user (show)

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


Attachments
squidguard sqlog overflow fix (squidguard-1.4-sglog.patch,1.59 KB, text/plain)
2009-02-16 20:14 UTC, emerald
Details
corrected patch not to enter emergency mode anymore and add log entries to (really) fix log overflow error (...probably...) (squidguard-1.4-vsnprintf.patch,3.63 KB, text/plain)
2009-04-26 00:35 UTC, emerald
Details

Note You need to log in before you can comment on or make changes to this bug.
Description emerald 2009-02-16 20:12:55 UTC
squidguard, both versions in portage, stop working after a while because of a 
log buffer overflow error.
The error is visible in the log with those lines:
> overflow in vsprintf (sgLogError): Success
> going into emergency mode

After this error occured squidguard will not work till squid is reloaded or 
even restarted (not sure now anymore).
The patch will replace the vsprintf call with a safe one and additionally 
increase the log buffer size (4k->8k).
The patch applies cleanly to both portage versions and with this patch 
squidguard never entered emergency mode anymore.
Comment 1 emerald 2009-02-16 20:14:19 UTC
Created attachment 182264 [details]
squidguard sqlog overflow fix
Comment 2 emerald 2009-02-16 20:16:07 UTC
Btw, I posted the patch on the upstream mailing list.
Comment 3 Alin Năstac (RETIRED) gentoo-dev 2009-02-17 22:43:56 UTC
Fixed in revision 1.4-r1, without buffer size increase.

Please send squidguard-1.4-vsnprintf.patch to upstream for inclusion. Thanks!
Comment 4 emerald 2009-04-25 23:21:03 UTC
The bug seems not fixed yet, I can't point to the actual error though :(

2009-04-25 10:39:27 [144641] Warning: Possible bypass attempt. Found multiple 
slashes where only one is expected: 
http://www.sysmath.com/xtkxysx_omrs_en//images/omrs_banner.jpg
2009-04-25 23:02:24 [144641] overflow in vsprintf (sgLogError): Success
2009-04-25 23:02:27 [144641] Going into emergency mode


using
[ebuild   R   ] net-proxy/squidguard-1.4-r1  USE="-ldap" 0 kB
Comment 5 emerald 2009-04-25 23:21:20 UTC
not yet fixed
Comment 6 emerald 2009-04-26 00:29:17 UTC
overflow fixed, emergency mode not yet fixed.
Comment 7 emerald 2009-04-26 00:35:54 UTC
Created attachment 189439 [details]
corrected patch not to enter emergency mode anymore and add log entries to (really) fix log overflow error
(...probably...)
Comment 8 Alin Năstac (RETIRED) gentoo-dev 2009-04-26 12:50:20 UTC
I've replaced sgLogFatalError with fprintf(stderr. 

Since both current revisions use the same vsnprintf.patch, you could either install the new version (-r3) or re-emerge the stable version (-r1).