bin/134916: truss off by one error on syscall check

Steven Hartland & steven.hartland at multiplay.co.uk
Sun May 24 19:20:03 UTC 2009


>Number:         134916
>Category:       bin
>Synopsis:       truss off by one error on syscall check
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun May 24 19:20:02 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Steven Hartland &
>Release:        FreeBSD 7.2-RELEASE i386
>Organization:
Multiplay
>Environment:
System: FreeBSD ftp1.multiplay.co.uk 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Sun May 24 19:21:08 BST 2009 root at ftp1.multiplay.co.uk:/usr/obj/usr/src/sys/MULTIPLAY i386

>Description:
	Truss has an invalid bounds check on syscalls which can result in a segv if an app which includes a syscall not listed is traces e.g. a new linux app.

>How-To-Repeat:
	Trace an application with a syscall > than the max syscall listed
>Fix:
	Change all occurances of:-
	(syscall_num < 0 || syscall_num > nsyscalls) ?  NULL : syscallnames[syscall_num];
	to:-
	(syscall_num < 0 || syscall_num >= nsyscalls) ?  NULL : syscallnames[syscall_num];


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list