Search Linux Wireless

Re: [bug report] wifi: mac80211: clean up connection process

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Dan,

> net/mac80211/mlme.c:8176 ieee80211_mgd_assoc() error: uninitialized symbol 'match_auth'.
> net/mac80211/mlme.c:8220 ieee80211_mgd_assoc() error: uninitialized symbol 'match_auth'.

Huh, that's interesting, how did we not notice this ... I'll fix it, but
I think I'll just make the assignment unconditional and add the part of
"ifmgd->auth_data &&" to the statement, rather than having the if.

> net/mac80211/mlme.c:8177 ieee80211_mgd_assoc() error: we previously assumed 'link' could be null (see line 8169)

>     8168                         link = sdata_dereference(sdata->link[i], sdata);
>     8169                         if (link)
>                                      ^^^^
> link checked for NULL

Right.


> --> 8176                         if (match_auth && i == assoc_link_id)
>                                      ^^^^^^^^^^
> Potentially uninitialized
> 
>     8177                                 assoc_data->link[i].conn = link->u.mgd.conn;
>                                                                     ^^^^^^
> Unchecked dereference.  This one is probably a false positive, but I
> just thought I would report it for completeness.

Yeah, hm. It's a bit tricky. I was going to say the link must be there,
but actually, that's not even entirely guaranteed; we could have been
doing FT-OTA without previous auth, and then the link might only be
assigned later in this code, in

        if (req->ap_mld_addr) {
                /* if there was no authentication, set up the link */
                err = ieee80211_vif_set_links(sdata, BIT(assoc_link_id), 0);



So I'll add a && link there, otherwise we anyway don't have data yet and
need to use the unlimited thing.

Thanks!

johannes





[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux