Search Linux Wireless

Re: [PATCH 2.6.40] wl12xx: fix oops in sched_scan when forcing a passive scan

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

 



hi Luca,

On Wed, May 25, 2011 at 7:16 PM, Luciano Coelho <coelho@xxxxxx> wrote:
> Fix kernel oops when trying to use passive scheduled scans.  The
> reason was that in passive scans there are no SSIDs, so there was a
> NULL pointer dereference.
>
> To solve the problem, we now check the number of SSIDs provided in the
> sched_scan request and only access the list if there's one or more
> (ie. passive scan is not forced).  We also move the channels from
> active to passive if passive scanning is forced.  For this to work,
> it's necessary to set both active and passive dwell times for all
> channels.
>
> Signed-off-by: Luciano Coelho <coelho@xxxxxx>
> ---
[...]

why does sched scan without ssids means passive scan? can't we just do
active sched scan without ssids?

> +       if (force_passive) {
> +               /* move active channels to passive lists */
> +               cfg->passive[0] += cfg->active[0] - 1;
> +               cfg->active[0] = 1;
looks like a potential integer underflow.

if you're forcing a passive scan, why do you need to set an active channel?

anyway, this seems a bit wrong.
i don't think you can just do "arbitrary transfers" of the channel
counts, as their order seem to matter (i.e. the order of elements in
the channel array is passive[0],passive[1],..,active[0],active[1]...,
so you actually need to shift all the elements)

Eliad.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux