From: Anisse Astier <anisse@astier.eu>
To: HacKurx <hackurx@gmail.com>
Cc: Kees Cook <keescook@chromium.org>, Rik van Riel <riel@redhat.com>,
intrigeri <intrigeri@boum.org>,
"kernel-hardening@lists.openwall.com"
<kernel-hardening@lists.openwall.com>
Subject: Re: [kernel-hardening] Patch for random mac address
Date: Fri, 9 Jun 2017 15:01:38 +0200 [thread overview]
Message-ID: <20170609130138.GA8257@bifrost> (raw)
In-Reply-To: <c3ae85ab-539f-daa1-e318-3175b674d4a2@gmail.com>
On Fri, Jun 09, 2017 at 02:00:37PM +0200, HacKurx wrote:
> Le 26/05/2017 à 14:34, Anisse Astier a écrit :
> > You didn't answer my question regarding why this is different from the
> > function eth_random_addr.
> What do you think by replacing the whole by that?
>
> +#ifdef CONFIG_RANDOM_MAC_ADDRESS
> + /* randomize MAC whenever interface is brought up */
> + if ((changes & IFF_UP) && !(old_flags & IFF_UP)) {
> + struct sockaddr sa;
> + eth_random_addr(sa.sa_data);
> + sa.sa_family = dev->type;
> + dev_set_mac_address(dev, &sa);
Yes, I meant something like that.
>
> The network doesn't work with "eth_hw_addr_random(dev);" (the change of MAC addresses works well). Do you know why ?
I think that's because eth_hw_addr_random() is meant to be called by the
driver. Your solution is simpler, although it doesn't set
addr_assign_type to NET_ADDR_RANDOM, athough this field seems to be used
erratically (some use it as bitfield, but it does not look like one).
> Because the eth_hw_addr_randomfunction works better on all types of network cards.
You mean eth_random_addr, correct ?
Regards,
Anisse
next prev parent reply other threads:[~2017-06-09 13:01 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-24 20:44 [kernel-hardening] Patch for random mac address HacKurx
2017-05-24 22:40 ` Casey Schaufler
2017-05-24 23:05 ` Lukas Odzioba
2017-05-25 7:31 ` intrigeri
2017-05-25 15:07 ` Rik van Riel
2017-05-25 15:47 ` intrigeri
2017-05-25 15:59 ` Rik van Riel
2017-05-25 17:28 ` Kees Cook
2017-05-25 21:28 ` Anisse Astier
2017-05-26 8:23 ` Daniel Micay
2017-05-26 7:55 ` HacKurx
2017-05-26 12:34 ` Anisse Astier
2017-05-26 14:41 ` HacKurx
2017-06-09 12:00 ` HacKurx
2017-06-09 13:01 ` Anisse Astier [this message]
2017-05-25 15:48 ` Theodore Ts'o
2017-06-09 13:11 ` Matt Brown
2017-06-10 7:00 ` HacKurx
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170609130138.GA8257@bifrost \
--to=anisse@astier.eu \
--cc=hackurx@gmail.com \
--cc=intrigeri@boum.org \
--cc=keescook@chromium.org \
--cc=kernel-hardening@lists.openwall.com \
--cc=riel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.