Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 May 2009 20:13:20 +0100 (BST)
From:      Steven Hartland & <steven.hartland@multiplay.co.uk>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   bin/134916: truss off by one error on syscall check
Message-ID:  <200905241913.n4OJDKvX001068@ftp1.multiplay.co.uk>
Resent-Message-ID: <200905241920.n4OJK3Mx039560@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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@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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905241913.n4OJDKvX001068>