summaryrefslogtreecommitdiff
path: root/samples/fprobe
diff options
context:
space:
mode:
authorShuhao Fu <sfual@cse.ust.hk>2026-04-29 16:59:56 +0800
committerSteve French <stfrench@microsoft.com>2026-05-01 21:49:35 -0500
commita74668eb2c0b866d7ac4823be6006ab2e227bc03 (patch)
tree651fc5f0ade7b4aac85a144b0d31b0f6e468d46a /samples/fprobe
parentbf736184d063da1a552ffeff0481813599a182cc (diff)
ksmbd: fail share config requests when path allocation fails
Non-pipe shares must have a duplicated backing path before they can be published. share_config_request() currently calls kstrndup() for that path, but if the allocation fails it leaves ret unchanged. If veto list parsing succeeds and share->name exists, the partially built share is still inserted into the global share table with share->path left NULL. A later share-root SMB2 create uses tree_conn->share_conf->path as the lookup root. If the share was published with path == NULL, that request passes a NULL pathname into do_getname_kernel()/strlen() and can crash the ksmbd worker. Set ret = -ENOMEM when path duplication fails so the incomplete share is destroyed before publication. Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3") Signed-off-by: Shuhao Fu <sfual@cse.ust.hk> Acked-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'samples/fprobe')
0 files changed, 0 insertions, 0 deletions