-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Correclty pass through Ipv6 addresses in sharenfs #11939
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
Conversation
beba464
to
9782d81
Compare
68dad9c
to
8fe9726
Compare
@behlendorf Hi, I've found time to build/run testcases locally. I have now moved some of the testing into a new test case and in the last force-push updated only the assertions in that test case. I have run the new test-case locally and it goes through, so I am resonably sure that we shouldn't see any CI-Failure caused by the changes. I'd say that this PR is now ready for review, but I can't remove the "Work-In-Progress"-Label. It would be nice, if you could do that. |
1503482
to
bd2ca17
Compare
cbb1b65
to
a56fe2f
Compare
a56fe2f
to
4bdbf57
Compare
f263525
to
51ddcd5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for rebasing this and including the test case. This looks reasonable to me.
tests/zfs-tests/tests/functional/cli_root/zfs_share/zfs_share_013_pos.ksh
Outdated
Show resolved
Hide resolved
tests/zfs-tests/tests/functional/cli_root/zfs_share/zfs_share_013_pos.ksh
Show resolved
Hide resolved
Closes: openzfs#11171, openzfs#1894 Signed-off-by: Felix Dörre <[email protected]>
c5f08c0
to
5421a04
Compare
Do you know when this pull request will make it into the official release? I see it merged in the master branch, but the code is not making in the official releases |
Recognize when the host part of a sharenfs attribute is an ipv6 Literal and pass that through without modification. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Felix Dörre <[email protected]> Closes: openzfs#11171 Closes openzfs#11939 Closes: openzfs#1894
Recognize when the host part of a sharenfs attribute is an ipv6 Literal and pass that through without modification. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Felix Dörre <[email protected]> Closes: #11171 Closes #11939 Closes: #1894
Recognize when the host part of a
sharenfs
attribute is an ipv6 Literal and pass that through without modification.Motivation and Context
Closes: #11171
Closes: #1894
It might also solve CVE-2013-20001. This depends on the expectations an admin has. CVE-2013-20001 is exploitable when an admin configures an ipv6 address (range) for sharenfs and it is effectively ignored resulting in no error. With this patch, the Ipv6 range is interpreted successfully if enclosed in square brackets. If it is not enclosed in square brackets it is still interpreted as before: a list of strange host names, which could result in the confusion for CVE-2013-20001.
Description
If a host starts with
[
it is interpreted as an Ipv6 Literal. In that case, the host is assumed to go until the next]
. If such a]
does not occur, it is treated as syntax error. The next byte after]
must be either:
(for another host) or a null byte or/
indicating an IP-Range.How Has This Been Tested?
Created a new test case that runs through perfectly. Also manually setting the property and inspecting the corresponding file in
/etc/exports
shows the expected contents.Types of changes
Checklist:
Signed-off-by
.