[PATCH] Security fix for 2.1.111, 2.0.x forwardport

Chris Evans (chris@ferret.lmh.ox.ac.uk)
Sun, 26 Jul 1998 21:35:02 +0100 (GMT)


Hi Linus,

Please apply the below patch for 2.1.112. It fixes a problem to do with
append only files that we fixed in 2.0.34.

I'd like to again express my strong concerns that 2.2.0 will be
substantially _less_ stable than 2.0.x, unless we get a few more people to
look over the later 2.0.x patches and forward port all the fixes.

Many of the fixes were for deadly but hard to trigger bugs. This makes the
fixes valuable in terms of time and effort. Let's make sure we don't have
to re-fix 2.2.0 for the same bugs; that would be a waste of time, and
somewhat tragic.

Cheers
Chris

--- linux-2.1.111/mm/mmap.c.old Sun Jul 26 19:10:06 1998
+++ linux-2.1.111/mm/mmap.c Sun Jul 26 19:15:15 1998
@@ -199,6 +199,10 @@
/* make sure there are no mandatory locks on the file. */
if (locks_verify_locked(file->f_dentry->d_inode))
return -EAGAIN;
+ /* cevans - whoops another append-only file flaw */
+ if (IS_APPEND(file->f_dentry->d_inode) &&
+ (prot & PROT_WRITE))
+ return -EACCES;
/* fall through */
case MAP_PRIVATE:
if (!(file->f_mode & 1))

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html