Multiple buffer overflows in Cscope before 15.7a allow remote attackers to execute arbitrary code via long strings in input such as (1) source-code tokens and (2) pathnames, related to integer overflows in some cases. NOTE: this issue exists because of an incomplete fix for CVE-2004-2541.
Multiple buffer overflows in cscope 15.5 and earlier allow user-assisted attackers to cause a denial of service (crash) and possibly execute arbitrary code via multiple vectors including (1) a long pathname that is not properly handled during file list parsing, (2) long pathnames that result from path variable expansion such as tilde expansion for the HOME environment variable, and (3) a long -f (aka reffile) command line argument.
A stack-based buffer overflow existed in cscope's putstring function in cscope's versions prior to 15.6. A long function or symbol name in source code file could result in cscope crash or code execution when searching the source code for any function or symbol name.
Issue was originally reported via bug #189666, it can be reproduced using memcheck/tests/match-overrun.c from valgrind source tarball.
In cscope 15.6, putstring was replaced with function fetchstringfromdbase, which accepts target buffer size as its argument.
Upstream commit: http://cscope.cvs.sourceforge.net/viewvc/cscope/cscope/src/find.c?view=log#rev1.19
Patch, which was used in Fedora cscope packages and is used in cscope packages in Red Hat Enterprise Linux 5: http://cvs.fedoraproject.org/viewvc/rpms/cscope/devel/cscope-15.5-putstring-overflow.patch
Apple Security Team reported multiple buffer overflows in cscope, caused by insecure sprintf usage. Processing a maliciously crafted source file with cscope may lead to an unexpected application termination or arbitrary code execution.
main.c in cscope 15-4 and 15-5 creates temporary files with predictable filenames, which allows local users to overwrite arbitrary files via a symlink attack.