]> git.michaelhowe.org Git - packages/o/openafs.git/commit
Add array bounds checking in h_Enumerate
authorDan Hyde <drh@umich.edu>
Thu, 29 Oct 2009 16:07:47 +0000 (12:07 -0400)
committerRuss Allbery <rra@debian.org>
Mon, 30 Nov 2009 22:50:42 +0000 (14:50 -0800)
commit942ca7032c4f5710e10a92784ff0492fd7f9a5cf
treefd458d350568362f817f1448150f5af44f0e6e0b
parented293165d26e327b20bc9b69fc82030f65911c9d
Add array bounds checking in h_Enumerate

When hostList is not properly NULL-terminated, the current code does
not protect from buffer overflow.  The following patch prevents buffer
overflow, prints a message, and asserts.

On our Linux hosts, we never reached the original assert, as there is
a problem handling the segfault the buffer overflow causes.

FIXES 125506

Reviewed-on: http://gerrit.openafs.org/757
Reviewed-by: Dan Hyde <drh@umich.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 93d48b1735b88b3051357307bdbebf5da9872d69)

Change-Id: Idb920d2bd309b40ae9bebc6972e614ddf9ba8dcc
Reviewed-on: http://gerrit.openafs.org/862
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/viced/host.c