mm: check for valid prot settings (XCC)
authorBarret Rhoden <brho@cs.berkeley.edu>
Tue, 9 Apr 2019 00:31:44 +0000 (20:31 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Tue, 9 Apr 2019 00:38:55 +0000 (20:38 -0400)
commite696158ed173359dead7df5752acb6c16cb32e49
tree970d1f48a843b14eea5acbb0a5fdf2adacbfe22c
parente816d5c0ec933196f0cf16fa133a246483f82bda
mm: check for valid prot settings (XCC)

Prior to this commit, we were not checking 'prot' in mmap() and
mprotect() for extra bits.  The user could put arbitrary bits into a
VMR's prot.  We only checked the valid bits, since commit ee6bef89ffdb
("mm: fix checks for PROT_NONE").

One potential issue is buggy programs that had been passing extra bits.
Those will fail early now.

Tested with ssh and get_html.

Reinstall your kernel headers.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/include/ros/mman.h
kern/src/mm.c