2015-02-17 03:16:23

by George Spelvin

[permalink] [raw]
Subject: [BISECTED] 4943ba16 ("include crypto- module prefix") breaks wifi

I discovered when (belatedly) testing 3.19-rc7 the other week that
my laptop wifi was broken and would no longer associate.

I wasted a lot of time trying to bisect changes in net/wireless and
net/drivers wireless before figuring out that it was sonewhere else in
the kernel. An unrestricted bisect quickly homed in on this commit.

Apparently this is causing some necessary crypto algorithms to fail to
load, breaking my wifi.

Perhaps I'm displaying my ignorance of what's supposed to happen,
but shouldn't make install have installed some files with names like
/lib/modules/`uname r`/kernel/crypto/crypto-*.ko?

Or is it something only I'm hitting because I have a lot of common
crypto algorithms statically compiled into my kernel?

CONFIG_CRYPTO_CBC=y
CONFIG_CRYPTO_HMAC=y
CONFIG_CRYPTO_MD5=y
CONFIG_CRYPTO_SHA1=y
CONFIG_CRYPTO_AES=y
CONFIG_CRYPTO_AES_586=y
CONFIG_CRYPTO_ARC4=y


In more detail, when things are working, (such as on commit 4943ba1^
= 476c7fe2), wpa_supplicant logs:

wlan1: SME: Trying to authenticate with aa:bb:cc:dd:ee:ff (SSID='FOO' freq=24xx MHz)
wlan1: Trying to associate with aa:bb:cc:dd:ee:ff (SSID='FOO' freq=24xx MHz)
wlan1: Associated with aa:bb:cc:dd:ee:ff
wlan1: WPA: Key negotiation completed with aa:bb:cc:dd:ee:ff [PTK=CCMP GTK=CCMP]
wlan1: CTRL-EVENT-CONNECTED - Connection to aa:bb:cc:dd:ee:ff completed (aith) [id=0 id_str=]

Followed by group rekeying completed messages at 10 minute intervals.

Trying this on kernel 4943ba16 produces instead an endless loop of:

wlan1: SME: Trying to authenticate with aa:bb:cc:dd:ee:ff (SSID='FOO' freq=24xx MHz)
wlan1: Trying to associate with aa:bb:cc:dd:ee:ff (SSID='FOO' freq=24xx MHz)
wlan1: Associated with aa:bb:cc:dd:ee:ff
wlan1: WPA: Failed to set PTK to the driver (alg=3 keylen=16 bssid=aa:bb:cc:dd:ee:ff)
wlan1: CTRL-EVENT-DISCONNECTED bssid=aa:bb:cc:dd:ee:ff reason=1


The kernel logs are not particularly informative.

They just go through the usual successful series, but end with

wlan1: RxAssocResp from aa:bb:cc:dd:ee:ff (capab=0x431 status=0 aid=1)
wlan1: associated
wlan1: deauthenticating from 11:bb:cc:dd:ee:ff by local choice (Reason: 1=UNSPECIFIED)

While successful connection ends before that last line.


2015-02-17 06:49:04

by Mathias Krause

[permalink] [raw]
Subject: Re: [BISECTED] 4943ba16 ("include crypto- module prefix") breaks wifi

On 17 February 2015 at 04:09, George Spelvin <[email protected]> wrote:
> I discovered when (belatedly) testing 3.19-rc7 the other week that
> my laptop wifi was broken and would no longer associate.
>
> Apparently this is causing some necessary crypto algorithms to fail to
> load, breaking my wifi.
>
> Perhaps I'm displaying my ignorance of what's supposed to happen,
> but shouldn't make install have installed some files with names like
> /lib/modules/`uname r`/kernel/crypto/crypto-*.ko?

No, the module names do not change. They just got another module alias
with the "crypto-" prefix.

> Or is it something only I'm hitting because I have a lot of common
> crypto algorithms statically compiled into my kernel?
>
> CONFIG_CRYPTO_CBC=y
> CONFIG_CRYPTO_HMAC=y
> CONFIG_CRYPTO_MD5=y
> CONFIG_CRYPTO_SHA1=y
> CONFIG_CRYPTO_AES=y
> CONFIG_CRYPTO_AES_586=y
> CONFIG_CRYPTO_ARC4=y
>
> Trying this on kernel 4943ba16 produces instead an endless loop of:
>
> wlan1: SME: Trying to authenticate with aa:bb:cc:dd:ee:ff (SSID='FOO' freq=24xx MHz)
> wlan1: Trying to associate with aa:bb:cc:dd:ee:ff (SSID='FOO' freq=24xx MHz)
> wlan1: Associated with aa:bb:cc:dd:ee:ff
> wlan1: WPA: Failed to set PTK to the driver (alg=3 keylen=16 bssid=aa:bb:cc:dd:ee:ff)
> wlan1: CTRL-EVENT-DISCONNECTED bssid=aa:bb:cc:dd:ee:ff reason=1
>
>
> The kernel logs are not particularly informative.
>
> They just go through the usual successful series, but end with
>
> wlan1: RxAssocResp from aa:bb:cc:dd:ee:ff (capab=0x431 status=0 aid=1)
> wlan1: associated
> wlan1: deauthenticating from 11:bb:cc:dd:ee:ff by local choice (Reason: 1=UNSPECIFIED)
>
> While successful connection ends before that last line.

Commit 4943ba16bbc2 was incomplete and could have caused regressions
like the above. Those should have been fixed with commits 4943ba16bbc2
+ 3e14dcf7cb80. However, those should be in v3.19-rc7 already, so I'm
not much of a help here :(


Mathias

2015-02-17 16:43:53

by Kees Cook

[permalink] [raw]
Subject: Re: [BISECTED] 4943ba16 ("include crypto- module prefix") breaks wifi

On Mon, Feb 16, 2015 at 10:49 PM, Mathias Krause <[email protected]> wrote:
> On 17 February 2015 at 04:09, George Spelvin <[email protected]> wrote:
>> I discovered when (belatedly) testing 3.19-rc7 the other week that
>> my laptop wifi was broken and would no longer associate.
>>
>> Apparently this is causing some necessary crypto algorithms to fail to
>> load, breaking my wifi.
>>
>> Perhaps I'm displaying my ignorance of what's supposed to happen,
>> but shouldn't make install have installed some files with names like
>> /lib/modules/`uname r`/kernel/crypto/crypto-*.ko?
>
> No, the module names do not change. They just got another module alias
> with the "crypto-" prefix.

You can look at module aliases with "modinfo", for example:

$ modinfo raid5
...
alias: raid6
alias: raid5
alias: md-level-6
alias: md-raid6
alias: md-personality-8
...

>
>> Or is it something only I'm hitting because I have a lot of common
>> crypto algorithms statically compiled into my kernel?
>>
>> CONFIG_CRYPTO_CBC=y
>> CONFIG_CRYPTO_HMAC=y
>> CONFIG_CRYPTO_MD5=y
>> CONFIG_CRYPTO_SHA1=y
>> CONFIG_CRYPTO_AES=y
>> CONFIG_CRYPTO_AES_586=y
>> CONFIG_CRYPTO_ARC4=y
>>
>> Trying this on kernel 4943ba16 produces instead an endless loop of:
>>
>> wlan1: SME: Trying to authenticate with aa:bb:cc:dd:ee:ff (SSID='FOO' freq=24xx MHz)
>> wlan1: Trying to associate with aa:bb:cc:dd:ee:ff (SSID='FOO' freq=24xx MHz)
>> wlan1: Associated with aa:bb:cc:dd:ee:ff
>> wlan1: WPA: Failed to set PTK to the driver (alg=3 keylen=16 bssid=aa:bb:cc:dd:ee:ff)
>> wlan1: CTRL-EVENT-DISCONNECTED bssid=aa:bb:cc:dd:ee:ff reason=1
>>
>>
>> The kernel logs are not particularly informative.
>>
>> They just go through the usual successful series, but end with
>>
>> wlan1: RxAssocResp from aa:bb:cc:dd:ee:ff (capab=0x431 status=0 aid=1)
>> wlan1: associated
>> wlan1: deauthenticating from 11:bb:cc:dd:ee:ff by local choice (Reason: 1=UNSPECIFIED)
>>
>> While successful connection ends before that last line.
>
> Commit 4943ba16bbc2 was incomplete and could have caused regressions
> like the above. Those should have been fixed with commits 4943ba16bbc2
> + 3e14dcf7cb80. However, those should be in v3.19-rc7 already, so I'm
> not much of a help here :(

Just so I can keep things straight, the commits, in order, were:

Crypto prefix added: 5d26a105b5a7
Template prefixing fixed: 4943ba16bbc2d
Arch-specific aliases fixed: 3e14dcf7cb80

And now my head-scratching: your bisect shows that v3.19-rc7 fails,
but that prior to 4943ba16bbc2, things work correctly? As in, when
_only_ 5d26a105b5a7 is in your tree things _work_?

I would expect 5d26a105b5a7 to be what breaks things, not
4943ba16bbc2d. I wonder if userspace is calling modprobe (via
wpa_supplicant) directly on old aliases that got removed? For example,
gcm.ko switched from "rfc4106" to "crypto-rfc4106".

Could you rename and instrument your /sbin/modprobe to do something like:

#!/bin/sh
echo "$@" >> /root/modprobe.log
exec /sbin/modprobe.bin "$@"

Perhaps there's something being explicitly requested rather than
having it be kernel auto-loaded?

-Kees

--
Kees Cook
Chrome OS Security

2015-02-17 17:47:42

by George Spelvin

[permalink] [raw]
Subject: Re: [BISECTED] 4943ba16 ("include crypto- module prefix") breaks wifi

> And now my head-scratching: your bisect shows that v3.19-rc7 fails,
> but that prior to 4943ba16bbc2, things work correctly? As in, when
> _only_ 5d26a105b5a7 is in your tree things _work_?

Basically, yes. v3.19-rc7 fails with basically the same symptoms:
wpa_supplicant keeps looping trying to associate. I haven't compared
the log messages line-by-line.

It appears that it negotiates a crypto key and then fails to pass
it down to the kernel.

I haven't tested 5d26a105b5a7 specifically (when you say "_only_
5d26a105b5a7 is in your tree", do you mean that state, or that commit
cherry-picked?), but 4 commits later (476c7fe20f30) did get tested,
and it worked. (In fact, that was the final test in my bisect
process; once I typed "git bisect good", things worked.)

Also, one more detail:
- When I changed CTR and CCM from =m to =y, things started working.

Perhaps it's the unexpected case of a module using a static algorithm?
Anyway, let me collect more information before you put more time into
it.

> Could you rename and instrument your /sbin/modprobe to do something like:
>
> #!/bin/sh
> echo "$@" >> /root/modprobe.log
> exec /sbin/modprobe.bin "$@"
>
> Perhaps there's something being explicitly requested rather than
> having it be kernel auto-loaded?

Glad to. Thanks for the pointer!

Unless you say otherwise, I'll probably test on 3.19 release, since that
seems the most useful baseline for future repair.

2015-02-18 06:34:36

by George Spelvin

[permalink] [raw]
Subject: Re: [BISECTED] 4943ba16 ("include crypto- module prefix") breaks wifi

> Could you rename and instrument your /sbin/modprobe to do something like:
>
> #!/bin/sh
> echo "$@" >> /root/modprobe.log
> exec /sbin/modprobe.bin "$@"

Thanks for the script, bit it turned out not to work... modern modprobe
is a link to kmod, and if the basename of argv[0] is not exactly
"modprobe", it doesn't DTRT.

Solved by renaming to /sbin/x/modprobe.

Anyway, modprobe.log follows (with a slightly more ambitious script that
also shows the parent processes and environment), followed by straces
of manually repeating the failing modprobe commands.

It's trying to load modules named:

crypto-ccm(aes)
crypto-ccm(aes)-all
crypto-ctr(aes)
crypto-ctr(aes)-all

depmod -n doesn't show any aliases with parens in their names,


Wed Feb 18 06:57:55 UTC 2015 /sbin/modprobe -q -- crypto-ccm(aes)
My PID is 21789, PPID is 21788 -p 2 -p 6 -p 21788 -p 21789
PID TTY STAT TIME COMMAND
2 ? S 0:00 [kthreadd]
6 ? S 0:00 \_ [kworker/u4:0]
21788 ? S 0:00 \_ [kworker/u4:0]
21789 ? S 0:00 \_ /bin/bash /sbin/modprobe -q -- crypto-ccm(aes) HOME=/ TERM=linux PATH=/sbin:/usr/sbin:/bin:/usr/bin

Wed Feb 18 06:57:55 UTC 2015 /sbin/modprobe -q -- crypto-ccm(aes)-all
My PID is 21799, PPID is 21798 -p 2 -p 6 -p 21798 -p 21799
PID TTY STAT TIME COMMAND
2 ? S 0:00 [kthreadd]
6 ? S 0:00 \_ [kworker/u4:0]
21798 ? S 0:00 \_ [kworker/u4:0]
21799 ? S 0:00 \_ /bin/bash /sbin/modprobe -q -- crypto-ccm(aes)-all HOME=/ TERM=linux PATH=/sbin:/usr/sbin:/bin:/usr/bin

Wed Feb 18 06:57:55 UTC 2015 /sbin/modprobe -q -- crypto-ctr(aes)
My PID is 21808, PPID is 21807 -p 2 -p 6 -p 21807 -p 21808
PID TTY STAT TIME COMMAND
2 ? S 0:00 [kthreadd]
6 ? S 0:00 \_ [kworker/u4:0]
21807 ? S 0:00 \_ [kworker/u4:0]
21808 ? S 0:00 \_ /bin/bash /sbin/modprobe -q -- crypto-ctr(aes) HOME=/ TERM=linux PATH=/sbin:/usr/sbin:/bin:/usr/bin

Wed Feb 18 06:57:55 UTC 2015 /sbin/modprobe -q -- crypto-ctr(aes)-all
My PID is 21816, PPID is 21815 -p 2 -p 6 -p 21815 -p 21816
PID TTY STAT TIME COMMAND
2 ? S 0:00 [kthreadd]
6 ? S 0:00 \_ [kworker/u4:0]
21815 ? S 0:00 \_ [kworker/u4:0]
21816 ? S 0:00 \_ /bin/bash /sbin/modprobe -q -- crypto-ctr(aes)-all HOME=/ TERM=linux PATH=/sbin:/usr/sbin:/bin:/usr/bin

Wed Feb 18 06:57:55 UTC 2015 /sbin/modprobe -q -- crypto-ctr
My PID is 21827, PPID is 21826 -p 2 -p 6 -p 21826 -p 21827
PID TTY STAT TIME COMMAND
2 ? S 0:00 [kthreadd]
6 ? S 0:00 \_ [kworker/u4:0]
21826 ? S 0:00 \_ [kworker/u4:0]
21827 ? S 0:00 \_ /bin/bash /sbin/modprobe -q -- crypto-ctr HOME=/ TERM=linux PATH=/sbin:/usr/sbin:/bin:/usr/bin

Wed Feb 18 06:57:57 UTC 2015 /sbin/modprobe -q -- crypto-ccm(aes)
My PID is 21995, PPID is 21993 -p 2 -p 6 -p 21993 -p 21995
PID TTY STAT TIME COMMAND
2 ? S 0:00 [kthreadd]
6 ? S 0:00 \_ [kworker/u4:0]
21993 ? S 0:00 \_ [kworker/u4:0]
21995 ? S 0:00 \_ /bin/bash /sbin/modprobe -q -- crypto-ccm(aes) HOME=/ TERM=linux PATH=/sbin:/usr/sbin:/bin:/usr/bin

Wed Feb 18 06:57:57 UTC 2015 /sbin/modprobe -q -- crypto-ccm(aes)-all
My PID is 22006, PPID is 22005 -p 2 -p 6 -p 22005 -p 22006
PID TTY STAT TIME COMMAND
2 ? S 0:00 [kthreadd]
6 ? D 0:00 \_ [kworker/u4:0]
22005 ? S 0:00 \_ [kworker/u4:0]
22006 ? S 0:00 \_ /bin/bash /sbin/modprobe -q -- crypto-ccm(aes)-all HOME=/ TERM=linux PATH=/sbin:/usr/sbin:/bin:/usr/bin

Wed Feb 18 06:57:57 UTC 2015 /sbin/modprobe -q -- crypto-ctr(aes)
My PID is 22020, PPID is 22019 -p 2 -p 46 -p 22019 -p 22020
PID TTY STAT TIME COMMAND
2 ? S 0:00 [kthreadd]
46 ? S 0:00 \_ [kworker/u4:1]
22019 ? S 0:00 \_ [kworker/u4:1]
22020 ? S 0:00 \_ /bin/bash /sbin/modprobe -q -- crypto-ctr(aes) HOME=/ TERM=linux PATH=/sbin:/usr/sbin:/bin:/usr/bin

Wed Feb 18 06:57:57 UTC 2015 /sbin/modprobe -q -- crypto-ctr(aes)-all
My PID is 22029, PPID is 22028 -p 2 -p 46 -p 22028 -p 22029
PID TTY STAT TIME COMMAND
2 ? S 0:00 [kthreadd]
46 ? S 0:00 \_ [kworker/u4:1]
22028 ? S 0:00 \_ [kworker/u4:1]
22029 ? S 0:00 \_ /bin/bash /sbin/modprobe -q -- crypto-ctr(aes)-all HOME=/ TERM=linux PATH=/sbin:/usr/sbin:/bin:/usr/bin

Wed Feb 18 06:57:57 UTC 2015 /sbin/modprobe -q -- crypto-ctr
My PID is 22041, PPID is 22040 -p 2 -p 46 -p 22040 -p 22041
PID TTY STAT TIME COMMAND
2 ? S 0:00 [kthreadd]
46 ? R 0:00 \_ [kworker/u4:1]
22040 ? S 0:00 \_ [kworker/u4:1]
22041 ? S 0:00 \_ /bin/bash /sbin/modprobe -q -- crypto-ctr HOME=/ TERM=linux PATH=/sbin:/usr/sbin:/bin:/usr/bin

Wed Feb 18 06:58:00 UTC 2015 /sbin/modprobe -q -- crypto-ccm(aes)
My PID is 22247, PPID is 22244 -p 2 -p 6 -p 22244 -p 22247
PID TTY STAT TIME COMMAND
2 ? S 0:00 [kthreadd]
6 ? S 0:00 \_ [kworker/u4:0]
22244 ? S 0:00 \_ [kworker/u4:0]
22247 ? S 0:00 \_ /bin/bash /sbin/modprobe -q -- crypto-ccm(aes) HOME=/ TERM=linux PATH=/sbin:/usr/sbin:/bin:/usr/bin

Wed Feb 18 06:58:00 UTC 2015 /sbin/modprobe -q -- crypto-ccm(aes)-all
My PID is 22257, PPID is 22256 -p 2 -p 6 -p 22256 -p 22257
PID TTY STAT TIME COMMAND
2 ? S 0:00 [kthreadd]
6 ? S 0:00 \_ [kworker/u4:0]
22256 ? S 0:00 \_ [kworker/u4:0]
22257 ? S 0:00 \_ /bin/bash /sbin/modprobe -q -- crypto-ccm(aes)-all HOME=/ TERM=linux PATH=/sbin:/usr/sbin:/bin:/usr/bin

Wed Feb 18 06:58:00 UTC 2015 /sbin/modprobe -q -- crypto-ctr(aes)
My PID is 22266, PPID is 22265 -p 2 -p 6 -p 22265 -p 22266
PID TTY STAT TIME COMMAND
2 ? S 0:00 [kthreadd]
6 ? S 0:00 \_ [kworker/u4:0]
22265 ? S 0:00 \_ [kworker/u4:0]
22266 ? S 0:00 \_ /bin/bash /sbin/modprobe -q -- crypto-ctr(aes) HOME=/ TERM=linux PATH=/sbin:/usr/sbin:/bin:/usr/bin

Wed Feb 18 06:58:00 UTC 2015 /sbin/modprobe -q -- crypto-ctr(aes)-all
My PID is 22275, PPID is 22274 -p 2 -p 6 -p 22274 -p 22275
PID TTY STAT TIME COMMAND
2 ? S 0:00 [kthreadd]
6 ? D 0:00 \_ [kworker/u4:0]
22274 ? S 0:00 \_ [kworker/u4:0]
22275 ? S 0:00 \_ /bin/bash /sbin/modprobe -q -- crypto-ctr(aes)-all HOME=/ TERM=linux PATH=/sbin:/usr/sbin:/bin:/usr/bin

Wed Feb 18 06:58:00 UTC 2015 /sbin/modprobe -q -- crypto-ctr
My PID is 22287, PPID is 22286 -p 2 -p 11891 -p 22286 -p 22287
PID TTY STAT TIME COMMAND
2 ? S 0:00 [kthreadd]
11891 ? S 0:00 \_ [kworker/u4:2]
22286 ? S 0:00 \_ [kworker/u4:2]
22287 ? S 0:00 \_ /bin/bash /sbin/modprobe -q -- crypto-ctr HOME=/ TERM=linux PATH=/sbin:/usr/sbin:/bin:/usr/bin

Wed Feb 18 06:58:03 UTC 2015 /sbin/modprobe -q -- crypto-ccm(aes)
My PID is 22534, PPID is 22531 -p 2 -p 6 -p 22531 -p 22534
PID TTY STAT TIME COMMAND
2 ? S 0:00 [kthreadd]
6 ? S 0:00 \_ [kworker/u4:0]
22531 ? S 0:00 \_ [kworker/u4:0]
22534 ? S 0:00 \_ /bin/bash /sbin/modprobe -q -- crypto-ccm(aes) HOME=/ TERM=linux PATH=/sbin:/usr/sbin:/bin:/usr/bin

Wed Feb 18 06:58:03 UTC 2015 /sbin/modprobe -q -- crypto-ccm(aes)-all
My PID is 22542, PPID is 22541 -p 2 -p 6 -p 22541 -p 22542
PID TTY STAT TIME COMMAND
2 ? S 0:00 [kthreadd]
6 ? S 0:00 \_ [kworker/u4:0]
22541 ? S 0:00 \_ [kworker/u4:0]
22542 ? S 0:00 \_ /bin/bash /sbin/modprobe -q -- crypto-ccm(aes)-all HOME=/ TERM=linux PATH=/sbin:/usr/sbin:/bin:/usr/bin

Wed Feb 18 06:58:03 UTC 2015 /sbin/modprobe -q -- crypto-ctr(aes)
My PID is 22556, PPID is 22555 -p 2 -p 6 -p 22555 -p 22556
PID TTY STAT TIME COMMAND
2 ? S 0:00 [kthreadd]
6 ? D 0:00 \_ [kworker/u4:0]
22555 ? S 0:00 \_ [kworker/u4:0]
22556 ? S 0:00 \_ /bin/bash /sbin/modprobe -q -- crypto-ctr(aes) HOME=/ TERM=linux PATH=/sbin:/usr/sbin:/bin:/usr/bin

Wed Feb 18 06:58:03 UTC 2015 /sbin/modprobe -q -- crypto-ctr(aes)-all
My PID is 22570, PPID is 22569 -p 2 -p 11891 -p 22569 -p 22570
PID TTY STAT TIME COMMAND
2 ? S 0:00 [kthreadd]
11891 ? S 0:00 \_ [kworker/u4:2]
22569 ? S 0:00 \_ [kworker/u4:2]
22570 ? S 0:00 \_ /bin/bash /sbin/modprobe -q -- crypto-ctr(aes)-all HOME=/ TERM=linux PATH=/sbin:/usr/sbin:/bin:/usr/bin

Wed Feb 18 06:58:03 UTC 2015 /sbin/modprobe -q -- crypto-ctr
My PID is 22583, PPID is 22582 -p 2 -p 11891 -p 22582 -p 22583
PID TTY STAT TIME COMMAND
2 ? S 0:00 [kthreadd]
11891 ? S 0:00 \_ [kworker/u4:2]
22582 ? S 0:00 \_ [kworker/u4:2]
22583 ? S 0:00 \_ /bin/bash /sbin/modprobe -q -- crypto-ctr HOME=/ TERM=linux PATH=/sbin:/usr/sbin:/bin:/usr/bin

Wed Feb 18 06:58:10 UTC 2015 /sbin/modprobe -q -- crypto-ccm(aes)
My PID is 23162, PPID is 23159 -p 2 -p 11891 -p 23159 -p 23162
PID TTY STAT TIME COMMAND
2 ? S 0:00 [kthreadd]
11891 ? S 0:00 \_ [kworker/u4:2]
23159 ? S 0:00 \_ [kworker/u4:2]
23162 ? S 0:00 \_ /bin/bash /sbin/modprobe -q -- crypto-ccm(aes) HOME=/ TERM=linux PATH=/sbin:/usr/sbin:/bin:/usr/bin

Wed Feb 18 06:58:10 UTC 2015 /sbin/modprobe -q -- crypto-ccm(aes)-all
My PID is 23171, PPID is 23169 -p 2 -p 11891 -p 23169 -p 23171
PID TTY STAT TIME COMMAND
2 ? S 0:00 [kthreadd]
11891 ? S 0:00 \_ [kworker/u4:2]
23169 ? S 0:00 \_ [kworker/u4:2]
23171 ? S 0:00 \_ /bin/bash /sbin/modprobe -q -- crypto-ccm(aes)-all HOME=/ TERM=linux PATH=/sbin:/usr/sbin:/bin:/usr/bin

Wed Feb 18 06:58:10 UTC 2015 /sbin/modprobe -q -- crypto-ctr(aes)
My PID is 23184, PPID is 23181 -p 2 -p 11891 -p 23181 -p 23184
PID TTY STAT TIME COMMAND
2 ? S 0:00 [kthreadd]
11891 ? D 0:00 \_ [kworker/u4:2]
23181 ? S 0:00 \_ [kworker/u4:2]
23184 ? S 0:00 \_ /bin/bash /sbin/modprobe -q -- crypto-ctr(aes) HOME=/ TERM=linux PATH=/sbin:/usr/sbin:/bin:/usr/bin

Wed Feb 18 06:58:10 UTC 2015 /sbin/modprobe -q -- crypto-ctr(aes)-all
My PID is 23194, PPID is 23193 -p 2 -p 6 -p 23193 -p 23194
PID TTY STAT TIME COMMAND
2 ? S 0:00 [kthreadd]
6 ? S 0:00 \_ [kworker/u4:0]
23193 ? S 0:00 \_ [kworker/u4:0]
23194 ? S 0:00 \_ /bin/bash /sbin/modprobe -q -- crypto-ctr(aes)-all HOME=/ TERM=linux PATH=/sbin:/usr/sbin:/bin:/usr/bin

Wed Feb 18 06:58:10 UTC 2015 /sbin/modprobe -q -- crypto-ctr
My PID is 23203, PPID is 23202 -p 2 -p 6 -p 23202 -p 23203
PID TTY STAT TIME COMMAND
2 ? S 0:00 [kthreadd]
6 ? S 0:00 \_ [kworker/u4:0]
23202 ? S 0:00 \_ [kworker/u4:0]
23203 ? S 0:00 \_ /bin/bash /sbin/modprobe -q -- crypto-ctr HOME=/ TERM=linux PATH=/sbin:/usr/sbin:/bin:/usr/bin


execve("/sbin/x/modprobe", ["/sbin/x/modprobe", "-v", "crypto_ccm(aes)"], [/* 15 vars */]) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/i686/cmov/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
stat64("/etc/modprobe.d", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
openat(AT_FDCWD, "/etc/modprobe.d", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
fstatat64(3, "oss-compat.conf", {st_mode=S_IFREG|0644, st_size=119, ...}, 0) = 0
fstatat64(3, "fbdev-blacklist.conf", {st_mode=S_IFREG|0644, st_size=390, ...}, 0) = 0
fstatat64(3, "i915-kms.conf", {st_mode=S_IFREG|0644, st_size=23, ...}, 0) = 0
fstatat64(3, "etc-modules-parameters.conf", {st_mode=S_IFREG|0644, st_size=75, ...}, 0) = 0
fstatat64(3, "libpisock9.conf", {st_mode=S_IFREG|0644, st_size=16, ...}, 0) = 0
fstatat64(3, "local.conf", {st_mode=S_IFREG|0644, st_size=453, ...}, 0) = 0
stat64("/run/modprobe.d", 0xbf948aac) = -1 ENOENT (No such file or directory)
stat64("/lib/modprobe.d", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
openat(AT_FDCWD, "/lib/modprobe.d", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
fstatat64(3, "aliases.conf", {st_mode=S_IFREG|0644, st_size=655, ...}, 0) = 0
open("/lib/modprobe.d/aliases.conf", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/etc/modprobe.d/etc-modules-parameters.conf", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/etc/modprobe.d/fbdev-blacklist.conf", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/etc/modprobe.d/i915-kms.conf", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/etc/modprobe.d/libpisock9.conf", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/etc/modprobe.d/local.conf", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/lib/modules/3.19.0-00008-g95bebed/modules.softdep", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/etc/modprobe.d/oss-compat.conf", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/proc/cmdline", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/lib/modules/3.19.0-00008-g95bebed/modules.dep.bin", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/lib/modules/3.19.0-00008-g95bebed/modules.alias.bin", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/lib/modules/3.19.0-00008-g95bebed/modules.symbols.bin", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/lib/modules/3.19.0-00008-g95bebed/modules.builtin.bin", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/sys/module/crypto_ccm(aes)/initstate", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/sys/module/crypto_ccm(aes)", 0xbf948adc) = -1 ENOENT (No such file or directory)
write(2, "modprobe: FATAL: Module crypto_ccm(aes) not found.\n", 51) = 51
+++ exited with 1 +++

execve("/sbin/x/modprobe", ["/sbin/x/modprobe", "-v", "crypto_ccm(aes)_all"], [/* 15 vars */]) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/i686/cmov/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
stat64("/etc/modprobe.d", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
openat(AT_FDCWD, "/etc/modprobe.d", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
fstatat64(3, "oss-compat.conf", {st_mode=S_IFREG|0644, st_size=119, ...}, 0) = 0
fstatat64(3, "fbdev-blacklist.conf", {st_mode=S_IFREG|0644, st_size=390, ...}, 0) = 0
fstatat64(3, "i915-kms.conf", {st_mode=S_IFREG|0644, st_size=23, ...}, 0) = 0
fstatat64(3, "etc-modules-parameters.conf", {st_mode=S_IFREG|0644, st_size=75, ...}, 0) = 0
fstatat64(3, "libpisock9.conf", {st_mode=S_IFREG|0644, st_size=16, ...}, 0) = 0
fstatat64(3, "local.conf", {st_mode=S_IFREG|0644, st_size=453, ...}, 0) = 0
stat64("/run/modprobe.d", 0xbfb8e2ac) = -1 ENOENT (No such file or directory)
stat64("/lib/modprobe.d", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
openat(AT_FDCWD, "/lib/modprobe.d", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
fstatat64(3, "aliases.conf", {st_mode=S_IFREG|0644, st_size=655, ...}, 0) = 0
open("/lib/modprobe.d/aliases.conf", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/etc/modprobe.d/etc-modules-parameters.conf", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/etc/modprobe.d/fbdev-blacklist.conf", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/etc/modprobe.d/i915-kms.conf", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/etc/modprobe.d/libpisock9.conf", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/etc/modprobe.d/local.conf", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/lib/modules/3.19.0-00008-g95bebed/modules.softdep", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/etc/modprobe.d/oss-compat.conf", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/proc/cmdline", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/lib/modules/3.19.0-00008-g95bebed/modules.dep.bin", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/lib/modules/3.19.0-00008-g95bebed/modules.alias.bin", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/lib/modules/3.19.0-00008-g95bebed/modules.symbols.bin", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/lib/modules/3.19.0-00008-g95bebed/modules.builtin.bin", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/sys/module/crypto_ccm(aes)_all/initstate", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/sys/module/crypto_ccm(aes)_all", 0xbfb8e2dc) = -1 ENOENT (No such file or directory)
write(2, "modprobe: FATAL: Module crypto_ccm(aes)_all not found.\n", 55) = 55
+++ exited with 1 +++

execve("/sbin/x/modprobe", ["/sbin/x/modprobe", "-v", "crypto_ctr(aes)"], [/* 15 vars */]) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/i686/cmov/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
stat64("/etc/modprobe.d", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
openat(AT_FDCWD, "/etc/modprobe.d", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
fstatat64(3, "oss-compat.conf", {st_mode=S_IFREG|0644, st_size=119, ...}, 0) = 0
fstatat64(3, "fbdev-blacklist.conf", {st_mode=S_IFREG|0644, st_size=390, ...}, 0) = 0
fstatat64(3, "i915-kms.conf", {st_mode=S_IFREG|0644, st_size=23, ...}, 0) = 0
fstatat64(3, "etc-modules-parameters.conf", {st_mode=S_IFREG|0644, st_size=75, ...}, 0) = 0
fstatat64(3, "libpisock9.conf", {st_mode=S_IFREG|0644, st_size=16, ...}, 0) = 0
fstatat64(3, "local.conf", {st_mode=S_IFREG|0644, st_size=453, ...}, 0) = 0
stat64("/run/modprobe.d", 0xbffb1b7c) = -1 ENOENT (No such file or directory)
stat64("/lib/modprobe.d", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
openat(AT_FDCWD, "/lib/modprobe.d", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
fstatat64(3, "aliases.conf", {st_mode=S_IFREG|0644, st_size=655, ...}, 0) = 0
open("/lib/modprobe.d/aliases.conf", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/etc/modprobe.d/etc-modules-parameters.conf", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/etc/modprobe.d/fbdev-blacklist.conf", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/etc/modprobe.d/i915-kms.conf", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/etc/modprobe.d/libpisock9.conf", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/etc/modprobe.d/local.conf", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/lib/modules/3.19.0-00008-g95bebed/modules.softdep", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/etc/modprobe.d/oss-compat.conf", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/proc/cmdline", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/lib/modules/3.19.0-00008-g95bebed/modules.dep.bin", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/lib/modules/3.19.0-00008-g95bebed/modules.alias.bin", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/lib/modules/3.19.0-00008-g95bebed/modules.symbols.bin", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/lib/modules/3.19.0-00008-g95bebed/modules.builtin.bin", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/sys/module/crypto_ctr(aes)/initstate", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/sys/module/crypto_ctr(aes)", 0xbffb1bac) = -1 ENOENT (No such file or directory)
write(2, "modprobe: FATAL: Module crypto_ctr(aes) not found.\n", 51) = 51
+++ exited with 1 +++

execve("/sbin/x/modprobe", ["/sbin/x/modprobe", "-v", "crypto_ctr(aes)_all"], [/* 15 vars */]) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/i686/cmov/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
stat64("/etc/modprobe.d", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
openat(AT_FDCWD, "/etc/modprobe.d", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
fstatat64(3, "oss-compat.conf", {st_mode=S_IFREG|0644, st_size=119, ...}, 0) = 0
fstatat64(3, "fbdev-blacklist.conf", {st_mode=S_IFREG|0644, st_size=390, ...}, 0) = 0
fstatat64(3, "i915-kms.conf", {st_mode=S_IFREG|0644, st_size=23, ...}, 0) = 0
fstatat64(3, "etc-modules-parameters.conf", {st_mode=S_IFREG|0644, st_size=75, ...}, 0) = 0
fstatat64(3, "libpisock9.conf", {st_mode=S_IFREG|0644, st_size=16, ...}, 0) = 0
fstatat64(3, "local.conf", {st_mode=S_IFREG|0644, st_size=453, ...}, 0) = 0
stat64("/run/modprobe.d", 0xbfba17dc) = -1 ENOENT (No such file or directory)
stat64("/lib/modprobe.d", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
openat(AT_FDCWD, "/lib/modprobe.d", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
fstatat64(3, "aliases.conf", {st_mode=S_IFREG|0644, st_size=655, ...}, 0) = 0
open("/lib/modprobe.d/aliases.conf", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/etc/modprobe.d/etc-modules-parameters.conf", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/etc/modprobe.d/fbdev-blacklist.conf", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/etc/modprobe.d/i915-kms.conf", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/etc/modprobe.d/libpisock9.conf", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/etc/modprobe.d/local.conf", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/lib/modules/3.19.0-00008-g95bebed/modules.softdep", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/etc/modprobe.d/oss-compat.conf", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/proc/cmdline", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/lib/modules/3.19.0-00008-g95bebed/modules.dep.bin", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/lib/modules/3.19.0-00008-g95bebed/modules.alias.bin", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/lib/modules/3.19.0-00008-g95bebed/modules.symbols.bin", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/lib/modules/3.19.0-00008-g95bebed/modules.builtin.bin", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
open("/sys/module/crypto_ctr(aes)_all/initstate", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat64("/sys/module/crypto_ctr(aes)_all", 0xbfba180c) = -1 ENOENT (No such file or directory)
write(2, "modprobe: FATAL: Module crypto_ctr(aes)_all not found.\n", 55) = 55
+++ exited with 1 +++

2015-02-18 07:56:52

by Mathias Krause

[permalink] [raw]
Subject: Re: [BISECTED] 4943ba16 ("include crypto- module prefix") breaks wifi

On 18 February 2015 at 07:34, George Spelvin <[email protected]> wrote:
>
> It's trying to load modules named:
>
> crypto-ccm(aes)
> crypto-ccm(aes)-all
> crypto-ctr(aes)
> crypto-ctr(aes)-all
>
> depmod -n doesn't show any aliases with parens in their names,

That's okay. Also that it fails to load these as it'll fall back
trying to load modules for the templates in that case, as can be seen
in your log:

> Wed Feb 18 06:58:10 UTC 2015 /sbin/modprobe -q -- crypto-ctr

What's curious, however, that it only tries to load the template for
"ctr", not for "ccm". :/
Are the logs complete? Could you please simplify your /sbin/x/modprobe
wrapper to just output the modprobe call, as Kees suggested?

Also, could you please provide the output of "depmod -n | grep
crypto-"? There should be lines for crypto-ccm and crypto-ctr if you
build them as modules.


Mathias

2015-02-25 21:50:15

by Kees Cook

[permalink] [raw]
Subject: Re: [BISECTED] 4943ba16 ("include crypto- module prefix") breaks wifi

On Tue, Feb 17, 2015 at 11:56 PM, Mathias Krause <[email protected]> wrote:
> On 18 February 2015 at 07:34, George Spelvin <[email protected]> wrote:
>>
>> It's trying to load modules named:
>>
>> crypto-ccm(aes)
>> crypto-ccm(aes)-all
>> crypto-ctr(aes)
>> crypto-ctr(aes)-all
>>
>> depmod -n doesn't show any aliases with parens in their names,
>
> That's okay. Also that it fails to load these as it'll fall back
> trying to load modules for the templates in that case, as can be seen
> in your log:
>
>> Wed Feb 18 06:58:10 UTC 2015 /sbin/modprobe -q -- crypto-ctr
>
> What's curious, however, that it only tries to load the template for
> "ctr", not for "ccm". :/
> Are the logs complete? Could you please simplify your /sbin/x/modprobe
> wrapper to just output the modprobe call, as Kees suggested?

George, any updates on this?

> Also, could you please provide the output of "depmod -n | grep
> crypto-"? There should be lines for crypto-ccm and crypto-ctr if you
> build them as modules.

I still haven't been able to reproduce this. :(

-Kees

--
Kees Cook
Chrome OS Security

2015-04-30 11:07:33

by George Spelvin

[permalink] [raw]
Subject: Re: [BISECTED] 4943ba16 ("include crypto- module prefix") breaks wifi

Sorry for the long silence; the last e-mails arrived as I went on a trip,
and the packet got lost.

I just upgraded my laptop to 4.0.1 and had to remember the magic
incantation to get the wireless working. ("modprobe ctr")

> George, any updates on this?

It turns out that I found the problem. An odd bit of pilot error, but
NOT a kernel problem. See bottom.

> Also, could you please provide the output of "depmod -n | grep
> crypto-"? There should be lines for crypto-ccm and crypto-ctr if you
> build them as modules.

alias crypto-twofish-asm twofish_i586
alias crypto-twofish twofish_i586
alias crypto-salsa20-asm salsa20_i586
alias crypto-salsa20 salsa20_i586
alias crypto-serpent serpent_sse2_i586
alias crypto-cmac cmac
alias crypto-xcbc xcbc
alias crypto-md4 md4
alias crypto-sha256-generic sha256_generic
alias crypto-sha256 sha256_generic
alias crypto-sha224-generic sha256_generic
alias crypto-sha224 sha256_generic
alias crypto-ecb ecb
alias crypto-lrw lrw
alias crypto-xts xts
alias crypto-ctr ctr
alias crypto-rfc3686 ctr
alias crypto-gcm gcm
alias crypto-rfc4543 gcm
alias crypto-rfc4106 gcm
alias crypto-gcm_base gcm
alias crypto-ccm ccm
alias crypto-rfc4309 ccm
alias crypto-ccm_base ccm
alias crypto-cryptd cryptd
alias crypto-twofish-generic twofish_generic
alias crypto-twofish twofish_generic
alias crypto-serpent-generic serpent_generic
alias crypto-serpent serpent_generic
alias crypto-tnepres serpent_generic
alias crypto-salsa20-generic salsa20_generic
alias crypto-salsa20 salsa20_generic
alias crypto-michael_mic michael_mic
alias crypto-crc32 crc32
alias crypto-ansi_cprng ansi_cprng
alias crypto-stdrng ansi_cprng
alias crypto-ghash-generic ghash_generic
alias crypto-ghash ghash_generic


Anyway, the problem was a long time ago, in /etc/modprobe.d/local.conf,
I had blacklisted several unwanted crypto modules in order to suppress
some mysterious urge my system had to load every loadable module at
boot time.

"Hey, bozo! The point of making them modules is that I *don't* want them
taking up unswappable memory all the time!" So I hit it with a hammer.

One line written years ago was "blacklist ctr". The light dawns.

It turns out that this doesn's stop an explicit "modprobe ctr" from
working, but *does* stop alias processing that resolves to ctr.
Thus, the kernel change broke my strange kmod (mis-)configuration.

This fits the observed symptoms, and I apologize for wasting your time.

2015-06-05 23:07:30

by Kees Cook

[permalink] [raw]
Subject: Re: [BISECTED] 4943ba16 ("include crypto- module prefix") breaks wifi

On Thu, Apr 30, 2015 at 4:00 AM, George Spelvin <[email protected]> wrote:
> Sorry for the long silence; the last e-mails arrived as I went on a trip,
> and the packet got lost.
>
> I just upgraded my laptop to 4.0.1 and had to remember the magic
> incantation to get the wireless working. ("modprobe ctr")
>
>> George, any updates on this?
>
> It turns out that I found the problem. An odd bit of pilot error, but
> NOT a kernel problem. See bottom.
>
>> Also, could you please provide the output of "depmod -n | grep
>> crypto-"? There should be lines for crypto-ccm and crypto-ctr if you
>> build them as modules.
>
> alias crypto-twofish-asm twofish_i586
> alias crypto-twofish twofish_i586
> alias crypto-salsa20-asm salsa20_i586
> alias crypto-salsa20 salsa20_i586
> alias crypto-serpent serpent_sse2_i586
> alias crypto-cmac cmac
> alias crypto-xcbc xcbc
> alias crypto-md4 md4
> alias crypto-sha256-generic sha256_generic
> alias crypto-sha256 sha256_generic
> alias crypto-sha224-generic sha256_generic
> alias crypto-sha224 sha256_generic
> alias crypto-ecb ecb
> alias crypto-lrw lrw
> alias crypto-xts xts
> alias crypto-ctr ctr
> alias crypto-rfc3686 ctr
> alias crypto-gcm gcm
> alias crypto-rfc4543 gcm
> alias crypto-rfc4106 gcm
> alias crypto-gcm_base gcm
> alias crypto-ccm ccm
> alias crypto-rfc4309 ccm
> alias crypto-ccm_base ccm
> alias crypto-cryptd cryptd
> alias crypto-twofish-generic twofish_generic
> alias crypto-twofish twofish_generic
> alias crypto-serpent-generic serpent_generic
> alias crypto-serpent serpent_generic
> alias crypto-tnepres serpent_generic
> alias crypto-salsa20-generic salsa20_generic
> alias crypto-salsa20 salsa20_generic
> alias crypto-michael_mic michael_mic
> alias crypto-crc32 crc32
> alias crypto-ansi_cprng ansi_cprng
> alias crypto-stdrng ansi_cprng
> alias crypto-ghash-generic ghash_generic
> alias crypto-ghash ghash_generic
>
>
> Anyway, the problem was a long time ago, in /etc/modprobe.d/local.conf,
> I had blacklisted several unwanted crypto modules in order to suppress
> some mysterious urge my system had to load every loadable module at
> boot time.
>
> "Hey, bozo! The point of making them modules is that I *don't* want them
> taking up unswappable memory all the time!" So I hit it with a hammer.
>
> One line written years ago was "blacklist ctr". The light dawns.
>
> It turns out that this doesn's stop an explicit "modprobe ctr" from
> working, but *does* stop alias processing that resolves to ctr.
> Thus, the kernel change broke my strange kmod (mis-)configuration.
>
> This fits the observed symptoms, and I apologize for wasting your time.

No worries! Thanks for digging into it. I was really scratching my head. :)

-Kees

--
Kees Cook
Chrome OS Security