Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XCOPY follow up fixes #646

Merged
merged 4 commits into from
Jan 13, 2021

Conversation

ddiss
Copy link
Contributor

@ddiss ddiss commented Jan 13, 2021

This patch-set sits atop the cross-device XCOPY CVE fix submitted via #644 .

ddiss added 4 commits January 12, 2021 19:08
tcmu-runner can't determine whether the device(s) referred to in XCOPY
Copy Source/Copy Destination (CSCD) descriptors should be accessible to
the initiator via transport settings, ACLs, etc. Consequently, fail
XCOPY requests with CSCD descriptors which refer to any device other
than where the XCOPY request is processed.

References: CVE-2020-28374
Fixes: 9c86bd0 ("tcmur: Add emulate XCOPY command support")
Signed-off-by: David Disseldorp <ddiss@suse.de>
Reviewed-by: Lee Duncan <lduncan@suse.com>
EXTENDED COPY inline data is currently unprocessed, so fail requests if
the INLINE DATA LENGTH field indicates presence of any.

Fixes: 9c86bd0 ("tcmur: Add emulate XCOPY command support")
Signed-off-by: David Disseldorp <ddiss@suse.de>
The XCOPY Copy Source / Copy Destination (CSCD) parse loop currently
assumes that two descriptors are present. Remove this assumption and
instead use the CSCD DESCRIPTOR LIST LENGTH in case only a single CSCD
descriptor is carried, referred to by both segment descriptor CSCD
descriptor IDs.

Fixes: 9c86bd0 ("tcmur: Add emulate XCOPY command support")
Signed-off-by: David Disseldorp <ddiss@suse.de>
A null src_dev and dst_dev pointer appears to be quite possible after
CSCD list parsing, so this error condition should be handled.

Fixes: 9c86bd0 ("tcmur: Add emulate XCOPY command support")
Signed-off-by: David Disseldorp <ddiss@suse.de>
Copy link
Collaborator

@dillaman dillaman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@dillaman dillaman merged commit 1793db5 into open-iscsi:master Jan 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants