]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] sys_hpux: fix strlen_user() race
authorKyle McMartin <kyle@mcmartin.ca>
Tue, 7 Feb 2006 20:58:47 +0000 (12:58 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 8 Feb 2006 00:12:33 +0000 (16:12 -0800)
commit0628db0e93bd670f7bc2edacc82b82f0d9f4c343
treec352b63dc2d73e4033d064bb4b5437d76157bfa8
parent717b074fb0b2e202de0dc8258abd6c6e6b467a7d
[PATCH] sys_hpux: fix strlen_user() race

Userspace can alter the string after the kernel has run strlen_user().

Also: the strlen_user() return value includes the \0, so fix that.

Also: handle EFAULT from strlen_user().

It's unlikely anyone is using this code.  Very, very unlikely.  If I
remember correctly, CONFIG_HPUX turns this code on, but one would actually
need CONFIG_BINFMT_SOM to load a binary that could cause a problem, and
BINFMT_SOM has had an #error in it for quite some time.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/parisc/hpux/sys_hpux.c