bogon in 4.x memory device

From: Alfred Perlstein (bright@mu.org)
Date: 09/25/01


Date: Tue, 25 Sep 2001 02:07:01 -0500
From: Alfred Perlstein <bright@mu.org>
To: alpha@freebsd.org

without this top(1) fails on machines with raised securelevel.

can anyone review/comment?

Reported by: brian j. peterson <rbw@myplace.org>

Index: mem.c
===================================================================
RCS file: /home/ncvs/src/sys/alpha/alpha/mem.c,v
retrieving revision 1.19.2.3
diff -u -r1.19.2.3 mem.c
--- mem.c 2000/05/14 00:29:44 1.19.2.3
+++ mem.c 2001/09/25 06:55:30
@@ -138,7 +138,7 @@
         switch (minor(dev)) {
         case 0:
         case 1:
- if (securelevel >= 1)
+ if ((flags & FWRITE) && securelevel > 0)
                         return (EPERM);
                 break;
         case 32:

-- 
-Alfred Perlstein [alfred@freebsd.org]
'Instead of asking why a piece of software is using "1970s technology,"
start asking why software is ignoring 30 years of accumulated wisdom.'
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-security" in the body of the message


Relevant Pages

  • Re: Whats the point of __KERNEL_SYSCALLS__?
    ... retrieving revision 1.4 ... diff -u -p -r1.4 process.c ... -static int errno; ... * calls - which means inline code for fork too, ...
    (Linux-Kernel)
  • New Patch [was: Re: cvs rm sys/posix4 && enable sem]
    ... posix4/sched.h to sys/psched.h in this patch). ... "steps" as, in place of a repo-copy, I'll commit the diff to ... retrieving revision 1.2 ... +To compile this driver into the kernel, ...
    (freebsd-arch)
  • CONFIG_64_BIT
    ... retrieving revision 1.3 ... diff -u -p -r1.3 Kconfig ... config MMU ...
    (Linux-Kernel)
  • Re: vmstats entries type
    ... while updating the 64-bit per cpu counters. ... retrieving revision 1.80 ... diff -u -r1.80 vmstat.c ...
    (freebsd-current)
  • cvs rm sys/posix4 && enable sem
    ... diff -u -r1.265 Makefile ... retrieving revision 1.40 ... .Ft int ... +To compile this driver into the kernel, ...
    (freebsd-arch)