Re: Mounting corrupted HFS+ causes kernel NULL pointer dereference

2018-07-10 Thread Anatoly Trosinenko
> This should be fixed, but > it's not as big an issue as the deadlock. Filesystems usually don't need > to worry about protecting a crafted image from acting weird and causing > damage to itself. I just thought that deadlocking a single thread is not much worse than further damaging already damag

Re: Mounting corrupted HFS+ causes kernel NULL pointer dereference

2018-07-10 Thread Ernesto A . Fernández
On Tue, Jul 10, 2018 at 08:28:37PM +0300, Anatoly Trosinenko wrote: > Thank you, > > When applied this single patch on v4.18-rc4 and performed "echo > > /mnt/xyz" on hfsplus_16mb_hang image, I get about 14 pairs of lines > > hfsplus: unable to mark blocks free: error -5 > hfsplus: can't free exte

Re: Mounting corrupted HFS+ causes kernel NULL pointer dereference

2018-07-10 Thread Anatoly Trosinenko
Thank you, When applied this single patch on v4.18-rc4 and performed "echo > /mnt/xyz" on hfsplus_16mb_hang image, I get about 14 pairs of lines hfsplus: unable to mark blocks free: error -5 hfsplus: can't free extent Then `echo` exits with "No space left on device" error. Then it permits to per

Re: Mounting corrupted HFS+ causes kernel NULL pointer dereference

2018-07-09 Thread Ernesto A . Fernández
On Tue, Jun 12, 2018 at 09:43:26PM +0300, Anatoly Trosinenko wrote: > And when I mount hfsplus_16mb_hang and perform `echo > /mnt/xyz`, it hangs. I just sent you a patch for this final report. Let me know if it works for you.

Re: Mounting corrupted HFS+ causes kernel NULL pointer dereference

2018-07-02 Thread Anatoly Trosinenko
Thank you, now (with just this patch applied on top of v4.18-rc2) it just (asynchronously?) writes `hfsplus: b-tree write err: -5, ino: 3` to dmesg and does not segfaults. пт, 29 июн. 2018 г. в 21:45, Ernesto A. Fernández : > > Hi again: > > A patch for your original report has already been added t

Re: Mounting corrupted HFS+ causes kernel NULL pointer dereference

2018-06-29 Thread Ernesto A . Fernández
On Fri, Jun 29, 2018 at 03:45:43PM -0300, Ernesto A. Fernández wrote: > Hi again: > > A patch for your original report has already been added to the -mm tree. > > On Tue, Jun 12, 2018 at 09:43:26PM +0300, Anatoly Trosinenko wrote: > > Now, when mounting the attached hfsplus_16mb_segv to /mnt and

Re: Mounting corrupted HFS+ causes kernel NULL pointer dereference

2018-06-29 Thread Ernesto A . Fernández
Hi again: A patch for your original report has already been added to the -mm tree. On Tue, Jun 12, 2018 at 09:43:26PM +0300, Anatoly Trosinenko wrote: > Now, when mounting the attached hfsplus_16mb_segv to /mnt and > performing `dd if=/dev/zero of=/mnt/xyz bs=567879 count=1` I get > > [1.646

Re: Mounting corrupted HFS+ causes kernel NULL pointer dereference

2018-06-16 Thread Anatoly Trosinenko
Hello, > but was the original issue solved? Yes, after removing the suggested line and applying patch [2] on top of v4.17, when I try to mount the original FS image, mount just returns Invalid argument, no kernel NULL pointer dereferences anymore: mount: mounting /dev/sda on /mnt failed: Invalid

Re: Mounting corrupted HFS+ causes kernel NULL pointer dereference

2018-06-12 Thread Ernesto A . Fernández
Hi: On Tue, Jun 12, 2018 at 09:43:26PM +0300, Anatoly Trosinenko wrote: > Hello, > > > [1] https://www.spinics.net/lists/linux-fsdevel/msg125241.html > > [2] https://www.spinics.net/lists/linux-fsdevel/msg126499.html > > If I get it right, the first patch is already upstreamed in some > modified

Re: Mounting corrupted HFS+ causes kernel NULL pointer dereference

2018-06-08 Thread Pavel Machek
On Sun 2018-06-03 15:49:56, Ernesto A. Fernández wrote: 1;2802;0c> Hi, thank you for your report. > > On Sun, Jun 03, 2018 at 06:52:19PM +0300, Anatoly Trosinenko wrote: > > How to reproduce: > > 1. Take kernel source v4.17-rc7 > > 2. Compile it with the config attached > > 3. Unpack and mount the

Re: Mounting corrupted HFS+ causes kernel NULL pointer dereference

2018-06-03 Thread Anatoly Trosinenko
Hi, thank you! Excuse me for disturbance. вс, 3 июн. 2018 г. в 21:50, Ernesto A. Fernández : > > Hi, thank you for your report. > > On Sun, Jun 03, 2018 at 06:52:19PM +0300, Anatoly Trosinenko wrote: > > How to reproduce: > > 1. Take kernel source v4.17-rc7 > > 2. Compile it with the config attache

Re: Mounting corrupted HFS+ causes kernel NULL pointer dereference

2018-06-03 Thread Ernesto A . Fernández
Hi, thank you for your report. On Sun, Jun 03, 2018 at 06:52:19PM +0300, Anatoly Trosinenko wrote: > How to reproduce: > 1. Take kernel source v4.17-rc7 > 2. Compile it with the config attached > 3. Unpack and mount the attached FS image as hfsplus. We are aware of this issue and I've sent some p