Repository navigation
Features/rfc7844 - #6436
Features/rfc7844#6436
Conversation
| */ | ||
| /* NOTE: sending PRL options that Windows 10 RFC7844 implementation sends, | ||
| * ordered by code number, which in hexadecimal is: | ||
| * 37 0d 01 03 06 0f 1f 21 2b 2c 2e 2f 79 f9 fc */ |
There was a problem hiding this comment.
I like the idea of hiding in the crowd ;)
I don't get the comment though: 37 0d 01 ... is not the same as 1 3 6 ... below.
There was a problem hiding this comment.
I like the idea of hiding in the crowd ;)
:) i think what technically is called "bigger anonymity set"
I don't get the comment though: 37 0d 01 ... is not the same as 1 3 6 ... below.
It is: 0x35 = 55 (PRL), 0x0d = 15 (option length), and " 01 03 06 0f 1f 21 2b 2c 2e 2f 79 f9 fc" the actual options, iirc. It was useful to me when checking the tcpdump hex dump.
I think i should remove that comment, or use that hex string in a test, but i'm not sure how to create the test with it.
| client->req_opts_size, client->req_opts); | ||
| if (r < 0) | ||
| return r; | ||
| /* NOTE: in case that there would be an option to do not send |
There was a problem hiding this comment.
"to do not send any PRL" → "to send no PRLs"
Also a space between if and (.
| SD_DHCP_OPTION_INTERFACE_MTU_AGING_TIMEOUT = 24, | ||
| SD_DHCP_OPTION_INTERFACE_MTU = 26, | ||
| SD_DHCP_OPTION_BROADCAST = 28, | ||
| /* RFC7844, Windows 10 option */ |
There was a problem hiding this comment.
What do you mean by this comment? RFC7844 does not seem to define DHCP options.
There was a problem hiding this comment.
You're right, useful to me when doing grep, to find all my changes related to the RFC, but i should remove it.
|
I think it's something that we want, even though I imagine that getting things to the point where our DHCP implementation is hard to distinguish from others' will be a lot of work. Doesn't mean that we should start somewhere. How do you envision this should work at the high level? We certainly want to keep current non-anonymous default which are suitable for servers and virtualized systems. I'd imagine that we add a single option: [DHCP] Anonymize=yes|no (no by default). When set, it'd flip the relevant settings. The order of options would matter, and e.g. DUIDType=foobar Anonymize=yes would be different than Anonymize=yes DUIDType=foobar. That would be the simplest to implement, and relatively straightforward to understand. By default Anonymize=yes should give the best options as recommended by RFC 7844 (and mimicking Win10 when reasonable). If the user needs to deviate from that, they can do that by following with some tweaks like DUIDType= and so on. |
|
@keszybz: thanks a lot for your possitive comments.
Hmm, i didn't think about that possibility, i was only having in mind:
According to my little experience with this code so far, i think 1. is easier to implement. |
|
Regarding branches: there is of course a downside to anonymity. It makes network management harder. So you want to only do it on some network locations, typically the same locations where MAC address randomization is good idea.
…-- Christian Huitema
On Jul 25, 2017, at 8:53 AM, juga0 ***@***.***> wrote:
@keszybz: thanks a lot for your possitive comments.
In similar words to what @huitema, (one of the authors of the RFC 7844) told me, it's going to be very hard to do not fingerprint operating systems, because of many reasons, as other TCP/IP layers. But at least we could try to avoid fingerprinting a single person.
I chose to use the same options as Windows 10 because IMHO, the RFC is a bit too flexible about the options to choose, and at least choosing these: a. seem to work in most systems and b. would not make OS fingerprinting that obvious.
Would it help if i create another branch with an "Anonymize=yes|no" variable and modify the code according to it?.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
|
Just exploring the design space, with another possible proposal: Rather than introducing a new setting If the user adds any explicit directives to the |
(By "nullify" I understand you mean configuration that comes before and after this setting, as opposed to just before as in my description in #6436 (comment).)
Nah, anonymity is important, but but like security, it doesn't trump all other considerations. We should never ignore configuration explicitly specified by the user. I think Anonymize=yes should be a way to conveniently use a curated set of settings, but we shouldn't forbid deviating from that if needed. So neither 1. nor 2. are useful approaches.
This would not be backwards compatible, since MACAddressPolicy has been for a while and it would suddenly have a much larger scope. It also seems like too much magic. It's unfortunate that MACAddressPolicy is in .link files, so we can't make MACAddressPolicy controlled by Anonymize=yes. Having a separate Anonymize= setting also make whole thing much easier to document:
|
|
adding Anonymize= to .network files appears to be a good addition to me, and deriving too much from the MAC address opion in .link sounds a bit too magic for my taste I must say. |
|
let's drop the "needs-discussion" label, I think "Anonymize=BOOL" got enough support |
|
Thanks all of you for your comments. @keszybz, if this is the code networkd-network.c#L255 where the configuration variables are loaded, i didn't see an easy way to check whether I've leave notes in the code that can be useful while reviewing this PR, probably i should remove most of them. I did |
There was a problem hiding this comment.
this same commit should also carry the addition of the bool to the Network structure...
There was a problem hiding this comment.
please write this as <varname>Anonymize=</varname>, we try to stick to the same formatting for all settings
There was a problem hiding this comment.
hmm, our docbook usage isn't entirely clean, but I think for new additions we should rally stick to using <varname>…</varname> for all configuration file settings, and not <option>
There was a problem hiding this comment.
Apart of the format, i've changed also the content, because right now the order of other configuration variables doesn't overwrite what Anonymize sets, as i didn't see an easy way to check whether other variables are set before or after Anonymize.
There was a problem hiding this comment.
the commit that adds a new prototype should also carry the implementation
There was a problem hiding this comment.
i'd rewrite that this as:
if (!network->dhcp_anonymize)
return;such an early exit has the benefit that we don't have to indent as much...
There was a problem hiding this comment.
i meant about the comment <>,
as they won't be sent using Anonymize.
There was a problem hiding this comment.
I'd pass this as "false" here... after all the compiler will make no difference anyway, as bools degrade to int automatically... In public APIs we use C89 "int" for booleans, even though we use C99 "bool" everywhere else, and I figure that means in this case writing "flase" is much nicer to read, even if the parameter is actually an int because this is part of a supposedly eventually to be made public API
There was a problem hiding this comment.
the cast is redundant, the C compiler does that silently and automatically anyway
0eb8231 to
bd8603e
Compare
|
Thanks a lot @poettering. I think i resolved all your comments, further review would be great. |
poettering
left a comment
There was a problem hiding this comment.
looks pretty good. some more comments.
Sorry for the late review, many of us have been on vacation the past weeks (and some still are)
There was a problem hiding this comment.
this is the first patch in the series, but it references a variable "anonymize" that isn't added at the same time here.
Please make sure that each individual commit remains compilable.
There was a problem hiding this comment.
should probably say something like "Takes a boolean argument" or so, first.
There was a problem hiding this comment.
maybe make the RFC a ulink to the RFC text online?
There was a problem hiding this comment.
this commit really needs to come before you add it to the gperf table. I'd probably just merge the two commits into one if I were you, no need to be too finegrained on this thing
There was a problem hiding this comment.
maybe we should request this only if dhcp_use_timezone is set. A patch for that would be very welcome
bd8603e to
9595f70
Compare
|
Thanks for the comments, I agree with them and i've rebased the commits following them. I've also checked that the individual commits remain compilable. |
|
lgtm now, but needs a rebase, one of your own patches broke the merge ... ;-) |
to enable Anonymity Profiles and document it.
to initialize Network variables when Anonymize is true. * do not send hostname * client identifier set to MAC * do not send vendor class identifier * do not send other PRL options
Add also Client variable to know when Anonymize is true.
* check that Client has reserved memory for PRL * do not send duplicated ROUTES option when Anonymize is true
when Anonymize is enabled. Use the Client variable to know whether it is enabled.
Anonymize is true.
9595f70 to
dbb35f1
Compare
|
Rebased, now timezone and NTP options are sent depending on their configurations (by the other merges) instead of depending on anonymize. |
|
test-compress timed out during CI. I am pretty sure that's unrelated to the PR at hand. Merging. |
According to RFC7844 section 3 the DHCPDISCOVER message should not contain option 50 («Requested IP Address») when Anonymize is true
|
@serge-name thanks for letting me know, i'll have a look during next week. |
|
@serge-name I looked the diff of this file in this PR with the file in your PR #14049 and i don't think anything else broke this, just that i didn't see this case. So i think your patch is correct. Regarding the disucssion in #13992, i did not integrate the Anonymize option to check that MACAddressPolicy is True, what would be great to ensure that the MAC is being randomized, just commented on it (7585baa#diff-7fafbb4ebb0047d70a37c604a941252fR1008). This bug happens because there are not test for this case (and other possible situations in which Anonymize might not be check). It would be great to have them, i just didn't implement it cause i'm not familiar with systemd. |
networkd: implement the Anonymity Profiles specified in RFC7844
This PR is not intended to be accepted as it is, but to show how the
code would change implementing the RFC7844 Anonymity Profiles and to
obtain comments on what would be the prefered way to implement them.
There could be a configuration variable to enable or disable the
Anonymity Profiles.