Fix hostapd segfault on beacon hint event

Commit 795baf773f6d53bae3cfae4df6edda63e5022344 ('hostapd: Filter
channel list updated events after country code change') uses the
EVENT_CHANNEL_LIST_CHANGED data pointer, but it updated only one of the
callers to provide that data. NL80211_CMD_REG_BEACON_HINT event was
still sending the event without the initiator data and resulted in NULL
pointer dereference, e.g., if a scan was run while hostapd was running
and the driver was in world roaming state and enabled a channel for
active scans.

CRs-Fixed: 662554
Git-commit: 8597ebdbd44dd4dfb680a17a1d71c183377a0223
Git-repo : git://w1.fi/srv/git/hostap.git
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Change-Id: I947dc781166a627c8f80b08d43c094fe34a49279
P2P: Refrain from performing extended listen during P2P connection.

Do not perform extended listen period operations when either a P2P
connection is in progress. This makes the connection more robust should
an extended listen timer trigger during such an operation.

CRs-Fixed: 661586
Git-commit: 0f1034e3889e7b8f54ed59317f1234db8167d12e
Git-repo : git://w1.fi/srv/git/hostap.git
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Change-Id: I1f51d34e956fa2d6529c15c6b6dcb6cea1b3de41
P2P: Refrain from performing extended listen during PD

Extend the previous commit 0f1034e3889e7b8f54ed59317f1234db8167d12e to
skip extended listen also based on ongoing provision discovery operation
(which does not show up as a separate P2P module state and as such, was
not coveraged by the previous commit).

CRs-Fixed: 661586
Git-commit: 7e68be38e46d8f6cc7d5bc8083fe470d0418fb4f
Git-repo : git://w1.fi/srv/git/hostap.git
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Change-Id: Icdf4aac5b4b7c5600459f07a680f1171f8191dd0
WNM: Add debug logs to get the RSSI from the scan results

This commit adds few more debug prints to log the RSSI information from
the scanned BSSIDs and the current connected BSSID when comparing
neighbor results during WNM Transition Management Request processing.

CRs-Fixed: 684325
Change-Id: Id67bd7d898540d029ea7c67f992834dde140358f
Git-commit: 3c1060ff8fec3d5f8b14ccfd9b37ed6b682434e6
Git-repo : git://w1.fi/srv/git/hostap.git
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
WNM: Check wpa_s->current_bss more consistently

The scan result comparison routine would not make much sense without
current BSS level known, so return from the function without going
through the iteration that could have dereferenced the pointer if
wpa_s->current_bss == NULL.

CRs-Fixed: 684325
Change-Id: Ifb12fb53f5ca193e0d1c23c3115e3507108cbf00
Git-commit: 67adcd266c4ef3f9356190ef2c0727303f9532cb
Git-repo : git://w1.fi/srv/git/hostap.git
Signed-off-by: Jouni Malinen <j@w1.fi>
Merge branch 'cm-11.0' into stable/cm-11.0
Add os_exec() helper to run external programs

Change-Id: I579af1fa8c2f85622ffddb186ba799dcb9ac4b6f
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
wpa_cli: Use os_exec() for action script execution

Use os_exec() to run the action script operations to avoid undesired
command line processing for control interface event strings. Previously,
it could have been possible for some of the event strings to include
unsanitized data which is not suitable for system() use. (CVE-2014-3686)

Change-Id: I0005ed08e4b06ba3d2ebe95b9240050e47ed2e8c
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
hostapd_cli: Use os_exec() for action script execution

Use os_exec() to run the action script operations to avoid undesired
command line processing for control interface event strings. Previously,
it could have been possible for some of the event strings to include
unsanitized data which is not suitable for system() use. (CVE-2014-3686)

Change-Id: If46d6cfcb9d7fc9700965e818315e5aa50fa11a5
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
P2P: Extend the listen time based on the active concurrent session

A P2P Device while in the Listen state waiting to respond for the
obtained group negotiation request shall give a fair chance for other
concurrent sessions to use the shared radio by inducing an idle time
between the successive listen states. However, if there are no
concurrent operations, this idle time can be reduced.

CRs-Fixed: 606348
Git-commit: a2d63657603b8f0714274f34bea45cb5d0c0a7b9
Git-repo : git://w1.fi/srv/git/hostap.git
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Change-Id: Ifbc6b7687889055764ef462abb710ef9a6c580a8
X.509: Fix internal TLS/X.509 validation of PKCS#1 signature

Verify that there is no extra data after the hash field. This is needed
to avoid potential attacks using additional data to construct a value
that passes the RSA operation and allows the hash value to be forged.

CRs-Fixed: 654804
Change-Id: Iee0a8de08fd0f7d66b3bfd0c4396637d9b70e92f
Git-commit: 9c29d48725fd40a82407a89f193cf009aeef9745
Git-repo : git://w1.fi/srv/git/hostap.git
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
P2P: Fix segfault when PBC overlap is detected

If a separate P2P group interface is used, PBC overlap during group
formation causes the group interface to be removed, which ends up with
the interface context becoming invalid. Fix this by scheduling a timeout
to process the PBC overlap and interface removal instead of removing the
interface directly before the connection operation has returned.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Git-commit: ace0fbdb69b492a3aa6f24d07f0d6d4dffc4b7dc
Git-repo : git://w1.fi/srv/git/hostap.git
Change-Id: Iee452eb1ea731c7e216e0ec25a7c7235756589ac
CRs-fixed: 670339
Merge branch 'cm-11.0' into stable/cm-11.0