[Bug 41624] Re: Replaying journals of other OS's filesystems, by mounting them, is unsafe

2024-01-17 Thread Glenn Washburn
** Merge proposal linked:
   https://code.launchpad.net/~crass/casper/+git/casper/+merge/453083

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/41624

Title:
  Replaying journals of other OS's filesystems, by mounting them, is
  unsafe

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/iso-scan/+bug/41624/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 41624] Re: Replaying journals of other OS's filesystems, by mounting them, is unsafe

2023-10-04 Thread Glenn Washburn
Over a decade later... but this might help someone. There is a way
around this mess, with some caveats. You can set the block device to
readonly using blockdev. This works as desired a lot of the time.
However, sometimes (or perhaps everytime certain filesystems need to
replay the journal), the will cause the kernel to refuse to mount the
filesystem. The way around this is to, as mentioned above, replay the
journal to ram. As far as I know, no filesystems support this natively.
What can be done is to use dm-snapshot to create a snapshot of the block
device with the cow file residing on a tmpfs. Then mount the snapshot
device's filesystem as readonly. In this case the log will be replayed
to ram.

The caveat here is that, when in this state, the underlying block device
should not be written to. So effectively the block device is locked up
until the snapshot device is removed. A scenario where this might be an
issue is as follows. You have a harddrive with isos on an ext4
filesystem that you use to grub iso loopback mount to boot from. When
booting one of the isos, you use the snapshot setup with this filesystem
because you don't know if its part of a hibernation image or not. When
the livecd is up and running, you will not be able to modify the
filesystem (you can write to it, but all changes are in ram and will be
lost). That's as it should be if the filesystem is part of a hibernation
image, but it might be more likely that its not. And in that case, it
might be confusing why this restriction exists.

What would be good is to have code that can detect if the system has a
hibernation image or even better if the filesystem was mounted while a
hibernation happened (not sure if that's possible). Then the snapshot
work around could be done only when needed.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/41624

Title:
  Replaying journals of other OS's filesystems, by mounting them, is
  unsafe

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/iso-scan/+bug/41624/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 41624] Re: Replaying journals of other OS's filesystems, by mounting them, is unsafe

2011-05-03 Thread Colin Watson
What we're going to end up with here in the installer is using grub-
mount rather than mount, which guarantees a true read-only mount via
GRUB's filesystem drivers plus FUSE.  os-prober has already switched to
this, and we'll switch the rest of the installer over as time permits.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.
https://bugs.launchpad.net/bugs/41624

Title:
  Replaying journals of other OS's filesystems, by mounting them, is
  unsafe

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 41624] Re: Replaying journals of other OS's filesystems, by mounting them, is unsafe

2010-11-10 Thread Bug Watch Updater
** Changed in: os-prober (Debian)
   Status: New = Fix Released

-- 
Replaying journals of other OS's filesystems, by mounting them, is unsafe
https://bugs.launchpad.net/bugs/41624
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 41624] Re: Replaying journals of other OS's filesystems, by mounting them, is unsafe

2009-04-14 Thread Stefan Bader
Closing this as won't fix. Upstream will not change this behavior and
have their arguments for that. A deviation for Ubuntu is unmaintainable.
The only way to prevent write access by Linux is to set the device
access rights to read-only.

** Changed in: linux (Ubuntu)
   Status: Triaged = Won't Fix

-- 
Replaying journals of other OS's filesystems, by mounting them, is unsafe
https://bugs.launchpad.net/bugs/41624
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


Re: [Bug 41624] Re: Replaying journals of other OS's filesystems, by mounting them, is unsafe

2008-09-08 Thread Phillip Susi
Ian Jackson wrote:
 You can say don't do that then but
mount -o ro
 is exactly what every administrator reaches for in time of trouble,
 and they expect it to do no harm.

That was exactly the point I argued on the LKML but they don't seem to 
see it that way.  Maybe Ben Collins can try to knock this sense into 
them, or fix it for Ubuntu?

-- 
Replaying journals of other OS's filesystems, by mounting them, is unsafe
https://bugs.launchpad.net/bugs/41624
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


Re: [Bug 41624] Re: Replaying journals of other OS's filesystems, by mounting them, is unsafe

2008-09-07 Thread Ian Jackson
Phillip Susi writes ([Bug 41624] Re: Replaying journals of other OS's 
filesystems, by mounting them, is unsafe):
 Which kernel you are using does not really matter because the linux
 kernel developers consider this to be working as intended.  I have tried
 arguing with the on the LKML a few times with no success.  They seem to
 think that the read only mount flag does not mean do not write to this
 disk but rather do not allow files to be opened for write access.

Phillip is correct.

 If we want this fixed, we're going to have to fix it ourselves it looks
 like.

I think we should do so.

Just this week I was helping someone recover a machine which was
already damaged at the time and was made worse when they typed
   mount -o ro /dev/mapper/volumegroup-logicalvolume-real /mnt
which causes ext3 to write the journal back into the snapshotted
volume bypassing the LVM system.

You can say don't do that then but
   mount -o ro
is exactly what every administrator reaches for in time of trouble,
and they expect it to do no harm.

Ian.

-- 
Replaying journals of other OS's filesystems, by mounting them, is unsafe
https://bugs.launchpad.net/bugs/41624
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 41624] Re: Replaying journals of other OS's filesystems, by mounting them, is unsafe

2008-08-29 Thread Phillip Susi
Which kernel you are using does not really matter because the linux
kernel developers consider this to be working as intended.  I have tried
arguing with the on the LKML a few times with no success.  They seem to
think that the read only mount flag does not mean do not write to this
disk but rather do not allow files to be opened for write access.

If we want this fixed, we're going to have to fix it ourselves it looks
like.

-- 
Replaying journals of other OS's filesystems, by mounting them, is unsafe
https://bugs.launchpad.net/bugs/41624
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 41624] Re: Replaying journals of other OS's filesystems, by mounting them, is unsafe

2008-08-28 Thread Leann Ogasawara
The Ubuntu Kernel Team is planning to move to the 2.6.27 kernel for the
upcoming Intrepid Ibex 8.10 release.  As a result, the kernel team would
appreciate it if you could please test this newer 2.6.27 Ubuntu kernel.
There are one of two ways you should be able to test:

1)  If you are comfortable installing packages on your own, the linux-
image-2.6.27-* package is currently available for you to install and
test.

--or--

2)  The upcoming Alpha5 for Intrepid Ibex 8.10 will contain this newer
2.6.27 Ubuntu kernel.  Alpha5 is set to be released Thursday Sept 4.
Please watch http://www.ubuntu.com/testing for Alpha5 to be announced.
You should then be able to test via a LiveCD.

Please let us know immediately if this newer 2.6.27 kernel resolves the
bug reported here or if the issue remains.  More importantly, please
open a new bug report for each new bug/regression introduced by the
2.6.27 kernel and tag the bug report with 'linux-2.6.27'.  Also, please
specifically note if the issue does or does not appear in the 2.6.26
kernel.  Thanks again, we really appreicate your help and feedback.

** Tags added: cft-2.6.27

-- 
Replaying journals of other OS's filesystems, by mounting them, is unsafe
https://bugs.launchpad.net/bugs/41624
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 41624] Re: Replaying journals of other OS's filesystems, by mounting them, is unsafe

2008-06-11 Thread Colin Watson
partman-basicfilesystems no longer automounts by default, as of Hardy,
which takes care of that part of this bug:

partman-basicfilesystems (56ubuntu4) hardy; urgency=low

  * Disable automounting unless partman/automount is preseeded to true. This
makes LP #106209 much less likely to occur, since future installations
are less likely to format a partition whose UUID we have in /etc/fstab.

 -- Colin Watson [EMAIL PROTECTED]  Wed, 09 Apr 2008 08:18:47 +0100

** Changed in: linux (Ubuntu)
Sourcepackagename: linux-source-2.6.22 = linux

** Changed in: partman-basicfilesystems (Ubuntu)
 Assignee: (unassigned) = Colin Watson (kamion)
   Status: Confirmed = Fix Released

-- 
Replaying journals of other OS's filesystems, by mounting them, is unsafe
https://bugs.launchpad.net/bugs/41624
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 41624] Re: Replaying journals of other OS's filesystems, by mounting them, is unsafe

2008-06-11 Thread Colin Watson
See also bug 230703.

** Also affects: iso-scan (Ubuntu)
   Importance: Undecided
   Status: New

** Changed in: iso-scan (Ubuntu)
   Importance: Undecided = High
   Status: New = Triaged

** Also affects: lupin (Ubuntu)
   Importance: Undecided
   Status: New

** Changed in: lupin (Ubuntu)
   Importance: Undecided = Low
   Status: New = Triaged

-- 
Replaying journals of other OS's filesystems, by mounting them, is unsafe
https://bugs.launchpad.net/bugs/41624
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 41624] Re: Replaying journals of other OS's filesystems, by mounting them, is unsafe

2008-06-11 Thread Colin Watson
This definitely also affects iso-scan. lupin is affected in theory, but
in practice I think it's quite unlikely that somebody will start Wubi
and then hibernate Windows rather than simply rebooting.

-- 
Replaying journals of other OS's filesystems, by mounting them, is unsafe
https://bugs.launchpad.net/bugs/41624
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 41624] Re: Replaying journals of other OS's filesystems, by mounting them, is unsafe

2008-06-11 Thread Colin Watson
... and of course the Wubi installation process really does require
writing to the Windows filesystem, so the only thing that could be done
in lupin would be to refuse to function at all.

-- 
Replaying journals of other OS's filesystems, by mounting them, is unsafe
https://bugs.launchpad.net/bugs/41624
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 41624] Re: Replaying journals of other OS's filesystems, by mounting them, is unsafe

2007-12-27 Thread Phillip Susi
Marking as Triaged since the report is complete.

** Changed in: linux-source-2.6.22 (Ubuntu)
   Status: Incomplete = Triaged

-- 
Replaying journals of other OS's filesystems, by mounting them, is unsafe
https://bugs.launchpad.net/bugs/41624
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 41624] Re: Replaying journals of other OS's filesystems, by mounting them, is unsafe

2007-10-23 Thread Ian Jackson
** Changed in: partman-basicfilesystems (Ubuntu)
 Assignee: Ian Jackson (ijackson) = (unassigned)

-- 
Replaying journals of other OS's filesystems, by mounting them, is unsafe
https://bugs.launchpad.net/bugs/41624
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 41624] Re: Replaying journals of other OS's filesystems, by mounting them, is unsafe

2007-09-11 Thread Phillip Susi
Exactly.  If you do a read only mount of an inconsistent filesystem, you
/expect/ to get inconsistent results from trying to read an inconsistent
filesystem.  The whole idea though, is that you make your best effort to
access the data without modifying it and possibly causing more damage.

Since the lkml seems to have their head in the sand on this one, what
are the odds on Ubuntu diverging?

-- 
Replaying journals of other OS's filesystems, by mounting them, is unsafe
https://bugs.launchpad.net/bugs/41624
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 41624] Re: Replaying journals of other OS's filesystems, by mounting them, is unsafe

2007-09-03 Thread TJ
Marking the Gutsy-allocated part of this report Incomplete and assigning
to kernel-team to remove it from the list of outstanding new/undecided
bugs against Gutsy. Hopefully at some point a decision can be made over
what to do with this, but it looks like as far as the kernel is
concerned that might be a long way off, if at all.

I've noted Phillip's comments in theLKML discussion thread on this at
http://lkml.org/lkml/2007/4/8/97

** Changed in: linux-source-2.6.22 (Ubuntu)
 Assignee: (unassigned) = Ubuntu Kernel Team
   Status: New = Incomplete

-- 
Replaying journals of other OS's filesystems, by mounting them, is unsafe
https://bugs.launchpad.net/bugs/41624
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


Re: [Bug 41624] Re: Replaying journals of other OS's filesystems, by mounting them, is unsafe

2007-09-03 Thread Ian Jackson
TJ writes ([Bug 41624] Re: Replaying journals of other OS's filesystems,   
by mounting them, is unsafe):
 I've noted Phillip's comments in theLKML discussion thread on this at
 http://lkml.org/lkml/2007/4/8/97

Having read that thread, I'm deeply unimpressed by the head in the
sand attitude displayed by some participants.  Phillip Susi is of
course absolutely right.

Ian.

-- 
Replaying journals of other OS's filesystems, by mounting them, is unsafe
https://bugs.launchpad.net/bugs/41624
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 41624] Re: Replaying journals of other OS's filesystems, by mounting them, is unsafe

2007-09-03 Thread TJ
Ian, yes it does seem a bit pedantic although to be fair there was a
devils-advocate stance :)

I can see both arguments: On the one hand read-only should mean just
that, it should have the same effect as read-only media. On the other
hand a journalled file-system does need to replay the log to look
consistent, even if it is only replayed to RAM.

On balance, I'd say a read-only file-system shouldn't have the log file
replayed (to RAM or disk) no matter if it appears inconsistent at that
time. When the file-system is next mounted read-write (in this scenario,
by the OS that 'owns' it) the file system will be consistent.

-- 
Replaying journals of other OS's filesystems, by mounting them, is unsafe
https://bugs.launchpad.net/bugs/41624
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 41624] Re: Replaying journals of other OS's filesystems, by mounting them, is unsafe

2007-08-01 Thread Phillip Susi
That sounds like an acceptable workaround but I still maintain that this
is a kernel bug.  Read only means you no touch.


** Also affects: linux-source-2.6.22 (Ubuntu)
   Importance: Undecided
   Status: New

-- 
Replaying journals of other OS's filesystems, by mounting them, is unsafe
https://bugs.launchpad.net/bugs/41624
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 41624] Re: Replaying journals of other OS's filesystems, by mounting them, is unsafe

2007-04-19 Thread Bug Watch Updater
** Changed in: os-prober (Debian)
   Status: Unknown = Unconfirmed

-- 
Replaying journals of other OS's filesystems, by mounting them, is unsafe
https://bugs.launchpad.net/bugs/41624
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 41624] Re: Replaying journals of other OS's filesystems, by mounting them, is unsafe

2007-04-18 Thread Ian Jackson
** Changed in: partman-basicfilesystems (Ubuntu)
 Assignee: (unassigned) = Ian Jackson

-- 
Replaying journals of other OS's filesystems, by mounting them, is unsafe
https://bugs.launchpad.net/bugs/41624
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 41624] Re: Replaying journals of other OS's filesystems, by mounting them, is unsafe

2007-04-18 Thread Colin Watson
I would suggest teaching parted_server (in partman-base) about a new
command to tell whether the fs on a given partition is dirty, and making
use of that in partman-basicfilesystems where it decides whether to
automount things.

As far as os-prober goes, there was discussion about this recently
upstream in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=417407;
there was a suggestion here to protect block devices by using
'blockdev --setro', which ought to convince the kernel not to do
anything at all to the contents of the block device for the duration. I
think this ought to require resurrecting the port we used to have of
blockdev to busybox, rather than creating a new blockdev-udeb.

** Bug watch added: Debian Bug tracker #417407
   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=417407

** Also affects: os-prober (Debian) via
   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=417407
   Importance: Unknown
   Status: Unknown

-- 
Replaying journals of other OS's filesystems, by mounting them, is unsafe
https://bugs.launchpad.net/bugs/41624
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 41624] Re: Replaying journals of other OS's filesystems, by mounting them, is unsafe

2006-10-30 Thread Phillip Susi
Sounds like this is a kernel bug then?  Mounting a filesystem r/o should
NEVER modify the disk.  Should another bug be created for that and filed
upstream?

-- 
Replaying journals of other OS's filesystems, by mounting them, is unsafe
https://launchpad.net/bugs/41624

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs