Created attachment 1062995 [details] patch to fix the issue Description of problem: Program received signal SIGSEGV, Segmentation fault. __memcpy_sse2 () at ../sysdeps/x86_64/memcpy.S:196 196 movq (%rsi), %rax Missing separate debuginfos, use: debuginfo-install cyrus-sasl-lib-2.1.26-17.el7.x86_64 nspr-4.10.8-1.el7_1.x86_64 nss-3.19.1-5.el7_1.x86_64 nss-softokn-freebl-3.16.2.3-12.el7_1.x86_64 nss-util-3.19.1-3.el7_1.x86_64 zlib-1.2.7-13.el7.x86_64 (gdb) where #0 __memcpy_sse2 () at ../sysdeps/x86_64/memcpy.S:196 #1 0x0000555555558131 in memcpy (__len=40, __src=<optimized out>, __dest=0x7ffffffd6560) at /usr/include/bits/string3.h:51 #2 sgDbUpdate (Db=0x555555781210, key=key@entry=0x55555577c917 "brian", value=0x5576f1a0 <Address 0x5576f1a0 out of bounds>, len=len@entry=40) at sgDb.c:513 #3 0x000055555555aa41 in sgSourceUser (user=0x55555577c917 "brian") at sg.y:593 #4 0x000055555555e526 in yyparse () at sg.y:225 #5 0x000055555555e903 in sgReadConfig (file=<optimized out>) at sg.y:385 #6 0x00005555555563e8 in main (argc=1, argv=0x7fffffffe078, envp=0x7fffffffe088) at main.c:141 Version-Release number of selected component (if applicable): squidGuard-1.4-20.el7.1.x86_64 How reproducible: 100% Steps to Reproduce: 1. Install squid and squidGuard 2. Configure squidGuard acl for a user 3. Fetch a URL Actual results: squidGuard segfaults Expected results: squidGuard should not segfault Additional info: user configuration in squidGuard.conf: src brian { user brian } ... brian { pass whitelist !advertising all # redirect in the dest } It looks like Debian have fixed this in their package. I will attach the patch they apply to fix it. I have tested this patch in the EPEL build and it works. I also discovered that this package does not BuildRequires: gcc but of course it needs gcc to build. It shouldn't be assumed that gcc is installed.
See if the build here helps. https://fedorapeople.org/~limb/squidGuard/
@Brian Great job, this patch solve this squidGuard segfault. @Jon This squidGuard version has the same trouble.
https://fedorapeople.org/~limb/squidGuard/ gives me a 404 Brian's patch worked for me - I mangled the spec file and made an RPM for F23 out of the 1.4.30 src rpm for F27. Hope that helps anyone else getting the segfault < # $Id: squidGuard.spec,v 1.1 2017/09/25 01:41:42 root Exp $ --- > # $Id: squidGuard.spec,v 1.2 2017/09/25 01:41:25 root Exp $ 47a48 > Patch11: squidGuard-userinfo.patch 98a100 > %patch11 -p1 # cat ../SOURCES/squidGuard-userinfo.patch --- squidGuard-1.4/src/sgDiv.c.in.broken 2017-09-25 09:06:51.953586213 +0800 +++ squidGuard-1.4/src/sgDiv.c.in 2017-09-25 09:04:03.844150344 +0800 @@ -865,22 +865,3 @@ return buf; } -#if __STDC__ -struct UserInfo *setuserinfo() -#else -struct UserInfo *setuserinfo() -#endif -{ - static struct UserInfo uq; - uq.status = 0; - uq.time = 0; - uq.consumed = 0; - uq.last = 0; -#ifdef HAVE_LIBLDAP - uq.ldapuser = 0; - uq.found = 0; - uq.cachetime = 0; -#endif - return &uq; -} - --- squidGuard-1.4/src/sg.y.in.broken 2008-05-17 20:25:18.000000000 +0200 +++ squidGuard-1.4/src/sg.y.in 2010-06-25 16:57:09.026513217 +0200 @@ -389,6 +389,25 @@ fclose(yyin); } +#if __STDC__ +struct UserInfo *setuserinfo() +#else +struct UserInfo *setuserinfo() +#endif +{ + static struct UserInfo uq; + uq.status = 0; + uq.time = 0; + uq.consumed = 0; + uq.last = 0; +#ifdef HAVE_LIBLDAP + uq.ldapuser = 0; + uq.found = 0; + uq.cachetime = 0; +#endif + return &uq; +} + /*
FEDORA-2019-8e7b10f051 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-8e7b10f051
FEDORA-EPEL-2019-dd0e85097a has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-dd0e85097a
FEDORA-2019-6385bedea1 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2019-6385bedea1
FEDORA-EPEL-2019-963a0d1e0f has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-963a0d1e0f
FEDORA-2019-646841a313 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-646841a313
squidGuard-1.4-36.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-646841a313
squidGuard-1.4-36.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-8e7b10f051
squidGuard-1.4-36.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-963a0d1e0f
squidGuard-1.4-36.el8 has been pushed to the Fedora EPEL 8 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-dd0e85097a
squidGuard-1.4-36.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-6385bedea1
squidGuard-1.4-36.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.
squidGuard-1.4-36.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.
squidGuard-1.4-36.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.
squidGuard-1.4-36.el8 has been pushed to the Fedora EPEL 8 stable repository. If problems still persist, please make note of it in this bug report.
squidGuard-1.4-36.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.