summaryrefslogtreecommitdiffstats
path: root/sound/sparc
diff options
context:
space:
mode:
authorSerge E. Hallyn <serue@us.ibm.com>2009-05-20 10:15:28 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2009-06-19 11:00:54 -0700
commitf82ebea5c8ef9ed9378fc6402051a4860a805397 (patch)
tree505076547f6129a053f1972716ddf10a0fb93ce1 /sound/sparc
parent0f51010e87636ed93338f4d9a987a466ca0d6969 (diff)
downloadlinux-f82ebea5c8ef9ed9378fc6402051a4860a805397.tar.gz
linux-f82ebea5c8ef9ed9378fc6402051a4860a805397.tar.bz2
linux-f82ebea5c8ef9ed9378fc6402051a4860a805397.zip
staging: p9auth: prevent some oopses and memory leaks
Before all testcases, do: mknod /dev/caphash c 253 0 mknod /dev/capuse c 253 1 This patch does the following: 1. caphash write of > CAP_NODE_SIZE bytes overruns node_ptr->data (test: cat /etc/mime.types > /dev/caphash) 2. make sure we don't dereference a NULL cap_devices[0].head (test: cat serge@root@abab > /dev/capuse) 3. don't let strlen dereference a NULL target_user etc (test: echo ab > /dev/capuse) 4. Don't leak a bunch of memory in cap_write(). Note that technically node_ptr is not needed for the capuse write case. As a result I have a much more extensive patch splitting up cap_write(), but I thought a smaller patch that is easier to test and verify would be a better start. To test: cnt=0 while [ 1 ]; do echo /etc/mime.types > /dev/capuse if [ $((cnt%25)) -eq 0 ]; then head -2 /proc/meminfo fi cnt=$((cnt+1)) sleep 0.3 done Without this patch, it MemFree steadily drops. With the patch, it does not. I have *not* tested this driver (with or without these patches) with factotum or anything - only using the tests described above. Signed-off-by: Serge E. Hallyn <serue@us.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'sound/sparc')
0 files changed, 0 insertions, 0 deletions