[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080410144839.GQ11962@parisc-linux.org>
Date: Thu, 10 Apr 2008 08:48:39 -0600
From: Matthew Wilcox <matthew@....cx>
To: Jiri Kosina <jkosina@...e.cz>
Cc: Jan Kara <jack@...e.cz>, Michal Hocko <mhocko@...e.cz>,
Meelis Roos <mroos@...ux.ee>,
Linux Kernel list <linux-kernel@...r.kernel.org>,
linux-fsdevel@...r.kernel.org
Subject: Re: file offset corruption on 32-bit machines?
On Thu, Apr 10, 2008 at 04:31:09PM +0200, Jiri Kosina wrote:
> > Well, this race is more subtle - the window is just one instruction
> > wide (stores to f_pos from CPU2 must come between the store of lower and
> > upper 32-bits of f_pos on CPU1). And the only result is that f_pos has
> > 32-bits from one file pointer and 32-bits from the other one. So I can
> > hardly imagine this would be exploitable...
>
> Supposing you are not holding any spinlock and are running with
> preemptible kernel (pretty common scenario nowadays), there is nothing
> that would prevent kernel from rescheduling between the two instructions,
> enlarging the race window to be more comfortable for attacker, right?
>
> I think this is worth fixing.
Seems a lot like reading jiffies to me. Is the seqlock the right
solution to use for fixing this?
--
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists