linux-stable/arch/sparc
Al Viro 7780918b36 sparc32: fix a user-triggerable oops in clear_user()
Back in 2.1.29 the clear_user() guts (__bzero()) had been merged
with memset().  Unfortunately, while all exception handlers had been
copied, one of the exception table entries got lost.  As the result,
clear_user() starting at 128*n bytes before the end of page and
spanning between 8 and 127 bytes into the next page would oops when
the second page is unmapped.  It's trivial to reproduce - all
it takes is

main()
{
	int fd = open("/dev/zero", O_RDONLY);
	char *p = mmap(NULL, 16384, PROT_READ|PROT_WRITE,
			MAP_PRIVATE|MAP_ANON, -1, 0);
	munmap(p + 8192, 8192);
	read(fd, p + 8192 - 128, 192);
}

which had been oopsing since March 1997.  Says something about
the quality of test coverage... ;-/  And while today sparc32 port
is nearly dead, back in '97 it had been very much alive; in fact,
sparc64 had only been in mainline for 3 months by that point...

Cc: stable@kernel.org
Fixes: v2.1.29
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-07-21 18:23:55 -07:00
..
boot sparc: piggyback: handle invalid image 2020-06-22 15:44:44 -07:00
configs scsi: sr: remove references to BLK_DEV_SR_VENDOR, leave it enabled 2020-02-24 14:59:01 -05:00
crypto crypto: lib/sha1 - remove unnecessary includes of linux/cryptohash.h 2020-05-08 15:32:17 +10:00
include SPARC: backoff.h: delete a duplicated word 2020-07-21 18:22:02 -07:00
kernel sparc64: viohs: Use struct_size() helper 2020-06-22 15:43:16 -07:00
lib sparc32: fix a user-triggerable oops in clear_user() 2020-07-21 18:23:55 -07:00
math-emu treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
mm arch/sparc/mm/srmmu.c: fix build 2020-06-10 10:35:28 -07:00
net treewide: Use sizeof_field() macro 2019-12-09 10:36:44 -08:00
oprofile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
power treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
prom License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vdso mmap locking API: use coccinelle to convert mmap_sem rwsem call sites 2020-06-09 09:39:14 -07:00
Kbuild treewide: Add SPDX license identifier - Kbuild 2019-05-30 11:32:33 -07:00
Kconfig arch/sparc: Replace HTTP links with HTTPS ones 2020-07-13 16:59:29 -07:00
Kconfig.debug Kconfig: consolidate the "Kernel hacking" menu 2018-08-02 08:06:48 +09:00
Makefile sparc: generate uapi header and system call table files 2018-11-18 18:52:22 -08:00