lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 25 Jun 2019 10:56:39 +0200
From:   Arend Van Spriel <arend.vanspriel@...adcom.com>
To:     Johannes Berg <johannes@...solutions.net>,
        Tony Lindgren <tony@...mide.com>
Cc:     Kalle Valo <kvalo@...eaurora.org>,
        Eyal Reizer <eyalreizer@...il.com>,
        linux-wireless@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-omap@...r.kernel.org
Subject: Re: nl80211 wlcore regression in next

On 6/25/2019 10:02 AM, Johannes Berg wrote:
> On Tue, 2019-06-25 at 01:00 -0700, Tony Lindgren wrote:
>> Hi,
>>
>> * Johannes Berg <johannes@...solutions.net> [190625 07:47]:
>>> On Tue, 2019-06-25 at 00:38 -0700, Tony Lindgren wrote:
>>>> Hi,
>>>>
>>>> Looks like at least drivers/net/wireless/ti wlcore driver has stopped
>>>> working in Linux next with commit 901bb9891855 ("nl80211: require and
>>>> validate vendor command policy"). Reverting the commit above makes it
>>>> work again.
>>>>
>>>> It fails with the warning below, any ideas what goes wrong?
>>>
>>> Oops. For some reason, I neglected to check the vendor command usage
>>> beyond hwsim.
>>>
>>> The patch below should work?
>>
>> Yeah thanks that fixes the issue for me:
>>
>> Tested-by: Tony Lindgren <tony@...mide.com>
> 
> Thanks, I'll drop that into my tree and hopefully will remember to send
> it on soon.

Hi Johannes,

By chance noticed the patch included brcmfmac. So I tried, but I get 
compile issue below. It is because ERR_PTR really is an inline function 
so that is not working. So also need to patch that. I left the extra 
braces around the error code although not strictly necessary.

Regards,
Arend
---
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 2d17e32..da8249b 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -4172,7 +4172,7 @@ struct sta_opmode_info {
         u8 rx_nss;
  };

-#define VENDOR_CMD_RAW_DATA ((const struct nla_policy *)ERR_PTR(-ENODATA))
+#define VENDOR_CMD_RAW_DATA ((const struct nla_policy *)(-ENODATA))

  /**
   * struct wiphy_vendor_command - vendor command definition


---8<--------------------------------------------------------------------
   CC [M]  drivers/net/wireless/broadcom/brcm80211/brcmfmac/vendor.o
In file included from 
drivers/net/wireless/broadcom/brcm80211/brcmfmac/vendor.c:18:0:
./include/net/cfg80211.h:4175:29: error: initializer element is not constant
  #define VENDOR_CMD_RAW_DATA ((const struct nla_policy *)ERR_PTR(-ENODATA))
                              ^
drivers/net/wireless/broadcom/brcm80211/brcmfmac/vendor.c:126:13: note: 
in expansion of macro \u2018VENDOR_CMD_RAW_DATA\u2019
    .policy = VENDOR_CMD_RAW_DATA,
              ^
./include/net/cfg80211.h:4175:29: note: (near initialization for 
\u2018brcmf_vendor_cmds[0].policy\u2019)
  #define VENDOR_CMD_RAW_DATA ((const struct nla_policy *)ERR_PTR(-ENODATA))
                              ^
drivers/net/wireless/broadcom/brcm80211/brcmfmac/vendor.c:126:13: note: 
in expansion of macro \u2018VENDOR_CMD_RAW_DATA\u2019
    .policy = VENDOR_CMD_RAW_DATA,
              ^
make[3]: *** [drivers/net/wireless/broadcom/brcm80211/brcmfmac/vendor.o] 
Error 1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ