Re: [PATCH v2 1/2] nvmet: Fix use-after-free bug when a port is removed

2019-07-05 Thread Max Gurtovoy
On 7/5/2019 12:01 AM, Logan Gunthorpe wrote: On 2019-07-04 3:00 p.m., Max Gurtovoy wrote: Hi Logan, On 7/4/2019 2:03 AM, Logan Gunthorpe wrote: When a port is removed through configfs, any connected controllers are still active and can still send commands. This causes a use-after-free bug

Re: [PATCH v2 1/2] nvmet: Fix use-after-free bug when a port is removed

2019-07-04 Thread Logan Gunthorpe
On 2019-07-04 3:00 p.m., Max Gurtovoy wrote: > Hi Logan, > > On 7/4/2019 2:03 AM, Logan Gunthorpe wrote: >> When a port is removed through configfs, any connected controllers >> are still active and can still send commands. This causes a >> use-after-free bug which is detected by KASAN for any

Re: [PATCH v2 1/2] nvmet: Fix use-after-free bug when a port is removed

2019-07-04 Thread Max Gurtovoy
Hi Logan, On 7/4/2019 2:03 AM, Logan Gunthorpe wrote: When a port is removed through configfs, any connected controllers are still active and can still send commands. This causes a use-after-free bug which is detected by KASAN for any admin command that dereferences req->port (like in

Re: [PATCH v2 1/2] nvmet: Fix use-after-free bug when a port is removed

2019-07-03 Thread Sagi Grimberg
Reviewed-by: Sagi Grimberg

[PATCH v2 1/2] nvmet: Fix use-after-free bug when a port is removed

2019-07-03 Thread Logan Gunthorpe
When a port is removed through configfs, any connected controllers are still active and can still send commands. This causes a use-after-free bug which is detected by KASAN for any admin command that dereferences req->port (like in nvmet_execute_identify_ctrl). To fix this, disconnect all active