Files
linux/fs/ubifs
Artem Bityutskiy 4f4f117c9b UBIFS: fix oops when R/O file-system is fsync'ed
commit 78530bf7f2 upstream.

This patch fixes severe UBIFS bug: UBIFS oopses when we 'fsync()' an
file on R/O-mounter file-system. We (the UBIFS authors) incorrectly
thought that VFS would not propagate 'fsync()' down to the file-system
if it is read-only, but this is not the case.

It is easy to exploit this bug using the following simple perl script:

use strict;
use File::Sync qw(fsync sync);

die "File path is not specified" if not defined $ARGV[0];
my $path = $ARGV[0];

open FILE, "<", "$path" or die "Cannot open $path: $!";
fsync(\*FILE) or die "cannot fsync $path: $!";
close FILE or die "Cannot close $path: $!";

Thanks to Reuben Dowle <Reuben.Dowle@navico.com> for reporting about this
issue.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Reported-by: Reuben Dowle <Reuben.Dowle@navico.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-22 08:44:17 -07:00
..
2008-12-31 14:13:24 +02:00
2009-03-08 13:29:09 +02:00
2009-07-12 12:22:34 -07:00
2009-09-10 09:58:11 +03:00
2009-09-15 17:09:48 +03:00
2009-03-20 19:11:12 +02:00
2008-07-15 17:35:24 +03:00
2008-09-30 11:12:56 +03:00
2009-03-26 16:36:20 +02:00
2009-02-17 12:45:22 +02:00
2008-09-30 11:12:57 +03:00
2009-09-10 09:58:11 +03:00
2009-09-15 17:09:48 +03:00