Re: [PATCH v2] nbd: fix uaf in nbd_open

From: Christoph Hellwig
Date: Wed Nov 08 2023 - 02:19:31 EST


I don't think this is actually enough on it's own. You'll also
need to move al the teardown logic that is currently in
nbd_dev_remove. And with this you should be able to remove the
NULL check in nbd_open, and propably the nbd_index_mutex critical
section. Although that'll need a very careful audit.