fedora 24
buffer weakness #17

5

Weakness Breakdown


Definition:

Buffer overflows are one of the most well-known software vulnerabilities. Even though most developers know what buffer overflows are, attacks against the vulnerabilities are common in both legacy and newer applications. A classic buffer overflow exploit begins with the attacker sending data to a program, which it then stores in an undersized stack buffer. Besides stack buffer overflows, other kinds of buffer overflows include heap overflows, off-by-one errors and many others. Learn more about buffer overflows on OWASP attack index.

Warning code(s):

Does not check for buffer overflows.

File Name:

Rsolid/Rsolid/src/hdf5-1.8.3/src/H5private.h

Context:

The highlighted line of code below is the trigger point of this particular Fedora 24 buffer weakness.

     #define HDgetgroups(Z,G)	getgroups(Z,G)
#endif /* HDgetgroups */
#ifndef HDgetlogin
    #define HDgetlogin()		getlogin()
#endif /* HDgetlogin */
#ifndef HDgetpgrp
    #define HDgetpgrp()		getpgrp()
#endif /* HDgetpgrp */
#ifndef HDgetpid
    #define HDgetpid()		getpid()
#endif /* HDgetpid */
#ifndef HDgetppid
    #define HDgetppid()		getppid()
#endif /* HDgetppid */
#ifndef HDgetpwnam
    #define HDgetpwnam(S)		getpwnam(S)
#endif /* HDgetpwnam */
#ifndef HDgetpwuid
    #define HDgetpwuid(U)		getpwuid(U)
#endif /* HDgetpwuid */
#ifndef HDgetrusage
    #define HDgetrusage(X,S)	getrusage(X,S)
#endif /* HDgetrusage */
#ifndef HDgets
    #define HDgets(S)		gets(S)
#endif /* HDgets */
#ifndef HDgettimeofday
    #define HDgettimeofday(S,P)	gettimeofday(S,P)
#endif /* HDgettimeofday */
#ifndef HDgetuid
    #define HDgetuid()		getuid()
#endif /* HDgetuid */
#ifndef HDgmtime
    #define HDgmtime(T)		gmtime(T)
#endif /* HDgmtime */
#ifndef HDisalnum
    #define HDisalnum(C)		isalnum((int)(C)) /*cast for solaris warning*/
#endif /* HDisalnum */
#ifndef HDisalpha
    #define HDisalpha(C)		isalpha((int)(C)) /*cast for solaris warning*/
#endif /* HDisalpha */
#ifndef HDisatty
    #define HDisatty(F)		isatty(F)
#endif /* HDisatty */
#ifndef HDiscntrl
    #define HDiscntrl(C)		iscntrl((int)(C)) /*cast for solaris warning*/
#endif /* HDiscntrl */
#ifndef HDisdigit
    #define HDisdigit(C)		isdigit((int)(C)) /*cast for solaris warning*/
#endif /* HDisdigit */ 

The registered trademark Linux® is used pursuant to a sublicense from the Linux Foundation, the exclusive licensee of Linus Torvalds, owner of the mark on a world­wide basis.