diff options
| author | cg13442 <none@none> | 2008-04-10 08:07:57 -0700 |
|---|---|---|
| committer | cg13442 <none@none> | 2008-04-10 08:07:57 -0700 |
| commit | 7730e2acd408d8c08610e39353747d95fe743bce (patch) | |
| tree | 57c29c5b29c323a64691448f402438eaaf581aab | |
| parent | 95c191c028009254a621522ba1ba3a0557fdbd4b (diff) | |
| download | illumos-joyent-7730e2acd408d8c08610e39353747d95fe743bce.tar.gz | |
6686086 System call numbers in /etc/name_to_sysnmum should be range checked.
| -rw-r--r-- | usr/src/uts/common/os/modsubr.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/usr/src/uts/common/os/modsubr.c b/usr/src/uts/common/os/modsubr.c index 3b2348ad7d..19954a6cf8 100644 --- a/usr/src/uts/common/os/modsubr.c +++ b/usr/src/uts/common/os/modsubr.c @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -703,6 +703,14 @@ init_syscallnames(int size) for (hshndx = 0; hshndx < MOD_BIND_HASHSIZE; hshndx++) { for (bp = sb_hashtab[hshndx]; bp; bp = bp->b_next) { + if (bp->b_num < 0 || bp->b_num >= size) { + cmn_err(CE_WARN, + "!Couldn't add system call \"%s %d\". " + "Value out of range (0..%d) in " + "/etc/name_to_sysnum.", + bp->b_name, bp->b_num, size - 1); + continue; + } make_syscallname(bp->b_name, bp->b_num); } } |
