lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0c623d71-6d99-2e0d-4d8b-63a1ff814dc1@gmail.com>
Date:   Tue, 6 Jul 2021 06:31:11 +0530
From:   Rajat Asthana <thisisrast7@...il.com>
To:     Christoph Hellwig <hch@...radead.org>,
        Rajat Asthana <rajatasthana4@...il.com>
Cc:     axboe@...nel.dk, damien.lemoal@....com, jack@...e.cz,
        rafael@...nel.org,
        syzbot+7d6c5587ec9cff5be65c@...kaller.appspotmail.com,
        linux-kernel@...r.kernel.org, ming.lei@...hat.com,
        linux-block@...r.kernel.org, hare@...e.de,
        linux-kernel-mentees@...ts.linuxfoundation.org
Subject: Re: [PATCH] block: Avoid accessing an already freed kobject in
 delete_partition



On 03/07/21 10:56 am, Christoph Hellwig wrote:
> This should be fixed properly by:
> 
> "block: check disk exist before trying to add partition"

Hi Christoph, thanks a lot for suggesting this fix. I have been
working on implementing this and have tried the following:
- I checked if the the kobject of device structure embedded in
   gendisk structure is not NULL, to add the partition.
   This didn't work.

- Then I checked the if kobject of the block_device struct (part0)
   embedded in the gendisk struct is not NULL, to add the partition.
   This also didn't work.

- Then I checked the i_state of the bd_inode field of block_device
   struct embedded in the gendisk struct. I checked if the I_FREEING or
   I_WILL_FREE fields are not set. The reason behind doing this was
   to confirm that we only create partition on the disks which are not
   being freed.

Am I going in the right direction? Can you point me to the correct
direction if I am not?

thanks
-- Rajat

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ