Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1447694
| From | Christoph Hellwig <hch@lst.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] Fix NULL pointer dereference in bl_free_device(). |
| Date | 2016-07-21 10:10 +0200 |
| Message-ID | <rXhdn-4QE-9@gated-at.bofh.it> (permalink) |
| References | <rWF85-5Ir-1@gated-at.bofh.it> <rWFrr-5Qf-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Jul 19, 2016 at 05:39:04PM +0200, Artem Savkov wrote: > When bl_parse_deviceid() fails in bl_alloc_deviceid_node() on > blkdev_get_by_*() step we get an pnfs_block_dev struct that is > uninitialized except for bdev field which is set to whatever error > blkdev_get_by_*() returns. bl_free_device() then tries to call > blkdev_put() if bdev is not 0 resulting in a wrong pointer dereference. > > Fixing this by making sure bdev is not an error code in bl_free_device(). > > Signed-off-by: Artem Savkov <asavkov@redhat.com> I guess this is fine to be defensive, but we should probably just ensure ->bdev is NULLed on failure.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] Fix NULL pointer dereference in bl_free_device(). Artem Savkov <asavkov@redhat.com> - 2016-07-19 13:40 +0200
Re: [PATCH] Fix NULL pointer dereference in bl_free_device(). Anna Schumaker <Anna.Schumaker@netapp.com> - 2016-07-19 17:30 +0200
[PATCH v2] Fix NULL pointer dereference in bl_free_device(). Artem Savkov <asavkov@redhat.com> - 2016-07-19 17:50 +0200
Re: [PATCH v2] Fix NULL pointer dereference in bl_free_device(). Christoph Hellwig <hch@lst.de> - 2016-07-21 10:10 +0200
[PATCH v3] Fix NULL pointer dereference in bl_free_device(). Artem Savkov <asavkov@redhat.com> - 2016-07-21 13:40 +0200
Re: [PATCH v3] Fix NULL pointer dereference in bl_free_device(). "Benjamin Coddington" <bcodding@redhat.com> - 2016-07-21 14:30 +0200
Re: [PATCH] Fix NULL pointer dereference in bl_free_device(). Anna Schumaker <Anna.Schumaker@netapp.com> - 2016-07-19 17:30 +0200
csiph-web