Denis Kenzior
99923c90da
util: Be more paranoid when parsing addresses
...
Add a check to make sure that sscanf reads all 6 bytes of the address as
well.
2019-10-17 18:22:25 -05:00
Denis Kenzior
f878ec275d
scan: Fix logic error in frequency validation
...
The intent here was to validate that the frequency is a multiple of 5
and lies in a certain range. Somehow the channel was checked for being
a multiple of 5 instead.
2019-10-17 18:00:33 -05:00
Denis Kenzior
9ec50c910b
rtnlutil: Remove pointless conditional
...
gateway is checked to be !null above, so the conditional can be dropped.
2019-10-17 17:53:30 -05:00
Denis Kenzior
a533734471
p2putil: Fix logic in required attribute check
...
The logic here intended to check whether all required attributes were
available. However, it set the parse_error to true instead of
have_required to false as intended.
2019-10-17 17:39:53 -05:00
Denis Kenzior
5dbccee798
network: Be extra pedantic in network_get_psk
...
Check that the passphrase to PSK conversion actually succeeds.
2019-10-17 17:33:56 -05:00
Denis Kenzior
a043f26134
netdev: Skip IE processing of no request IEs sent
2019-10-17 17:30:11 -05:00
Denis Kenzior
aa75b3e06e
ap: Remove unneeded NULL check
...
sta is already dereferenced above, no need for the extra check here
2019-10-17 17:22:02 -05:00
Denis Kenzior
b6554ee41c
hwsim: Invoke l_queue_remove prior to object deletion
...
While the current code is quite safe, the new ordering makes more
logical sense and doesn't confuse static analysis tools.
2019-10-17 13:03:08 -05:00
Denis Kenzior
c8247c3754
unit: assert that l_settings creation/loading succeeds
2019-10-17 12:42:45 -05:00
Denis Kenzior
aba73171f6
wsc: Fix potential memory leak
...
If the netdev_connect_wsc call fails, handshake_state object isn't
freed.
2019-10-17 12:37:04 -05:00
Denis Kenzior
7397903234
monitor: Fix unused variable warning
2019-10-17 12:36:44 -05:00
Denis Kenzior
9a588944aa
backtrace: Don't ignore strchr errors
2019-10-17 12:10:36 -05:00
Denis Kenzior
ef0f9ad193
backtrace: Fix a potential buffer overrun
2019-10-17 12:08:21 -05:00
Denis Kenzior
e4dc23a523
monitor: Use print_ie in auth frame dumper
...
Do not assume that the challenge IE is present or the only IE in the
authentication frame
2019-10-17 12:04:08 -05:00
Denis Kenzior
e34af3cfac
monitor: Reset rtnl to NULL after destruction
2019-10-17 11:51:54 -05:00
Denis Kenzior
0b8de3d5df
monitor: Fix p2p channel list dumper
...
This dumper probably intended to update pos after invoking strncpy.
However, strncpy returns the number of bytes that *would* have been
copied and so the logic gets a bit complex to get completely right.
Instead, switch to using l_string since this is inside the monitor and
not particularly performance critical.
2019-10-17 11:49:11 -05:00
Denis Kenzior
39bb4d07ee
monitor: Fix potential memory leak
...
In case l_netlink object was not created successfully, rtmmsg would
leak.
2019-10-17 11:28:11 -05:00
James Prestwood
34560120f9
util: add bounds check to util_get_{domain,username}
...
Replace uses of strcpy by the safer l_strlcpy. Note that both of these
functions can only be called with a buffer of max 253 bytes (the
identity string), so this is purely a precautionary measure.
2019-10-17 11:21:47 -05:00
James Prestwood
65f279dc1e
util: Use memcpy instead of strncpy
...
The sub-string copied here will never have NULL terminators, so use
memcpy here to make this clearer.
2019-10-17 11:20:51 -05:00
James Prestwood
6b8f566498
ie: reorder ie_parse_osen to fix uninitialized value
...
RSNE_ADVANCE could result in a jump to the done label where info would
be copied without being initialized.
2019-10-16 21:25:41 -05:00
James Prestwood
de3a267d03
eapol: check return of ie_parse_rsne_from_data
2019-10-16 21:24:25 -05:00
James Prestwood
91c449d74a
eapol: reorder eapol_sm_free
...
Technically there's no problem here as l_queue_remove does not
dereference the pointer. Still, it confuses certain static analysis
tools in the current form. Reordering this will not change the behavior
at all.
2019-10-16 21:16:28 -05:00
James Prestwood
0ade612b3e
hotspot: check if HESSID parses correctly
2019-10-16 18:40:30 -05:00
James Prestwood
87a1c55145
hotspot: fix multiple potential memory leaks
2019-10-16 18:32:46 -05:00
Denis Kenzior
b3799a9f8d
owe: Fix potential memory leak
2019-10-16 18:14:17 -05:00
James Prestwood
96aa658375
sae: check return getting k_point
2019-10-16 18:09:29 -05:00
James Prestwood
ba7f7febd1
owe: fix potential uninitialized variable
2019-10-16 18:08:47 -05:00
James Prestwood
8bbfa4db49
owe: fix potential double free on error
2019-10-16 18:08:08 -05:00
James Prestwood
ab92901252
owe: check for error return getting shared_secret
2019-10-16 18:05:43 -05:00
James Prestwood
7b1e1497b7
ie: fix uninitialized rx/tx_nss values
2019-10-16 18:02:49 -05:00
James Prestwood
a8e935ee77
crypto: fix potential memory leak
2019-10-16 17:58:50 -05:00
James Prestwood
8364807938
eap-pwd: fix potential memory leak
2019-10-16 17:58:14 -05:00
James Prestwood
e31074b246
erp: check return of hkdf_expand
2019-10-16 17:57:05 -05:00
James Prestwood
81ec93fdcc
anqp: fix potential NULL pointer dereference
2019-10-16 17:57:05 -05:00
Denis Kenzior
269377c92f
scan: Simplify parsing using nl80211_parse_attrs
2019-10-16 16:33:40 -05:00
Tim Kourt
a5928f0e4c
client: Simplify printing logic
2019-10-16 15:50:02 -05:00
Tim Kourt
34cd8d5f3e
eap-ttls: Fix memory leak
...
A very unlikely condition could result in struct phase2_method being
leaked.
2019-10-16 15:48:32 -05:00
Denis Kenzior
6917f75c6a
doc: Add network configuration section to iwd.rst
...
Content is mostly pulled from the wiki and re-arranged slightly.
2019-10-16 15:45:58 -05:00
Florian Klink
af877978a1
doc: fix typo systemd->system
...
Even though this is equal on most distros, we're not quite there yet.
2019-10-14 16:38:49 -05:00
Denis Kenzior
c39d691197
TODO: Remove stale entries
...
These never turned out to be really needed.
2019-10-14 16:38:49 -05:00
Marcel Holtmann
ee67875824
build: Generate the list of .rst files from listed manual pages
2019-10-13 07:02:04 +02:00
Marcel Holtmann
62db2eaa73
build: Fix distribution of generated manual pages
2019-10-13 06:24:03 +02:00
Marcel Holtmann
3487aa5365
README: Mention --disable-manual-pages in case rst2man is missing
2019-10-12 20:14:39 +02:00
James Prestwood
fe179f96fd
eap: utilize IWD_MODULE
...
Converts eap into an IWD module.
2019-10-11 15:45:26 -05:00
James Prestwood
f71a28ce38
unit: update wsc/eapol with new eap_init
...
test-eapol was passing zero as the MTU, so this simply needed to be
updated to remove that parameter.
test-wsc was actually setting a MTU value so when building the
settings we now add the proper value so the MTU can be set with
__eap_set_config.
2019-10-11 15:45:26 -05:00
James Prestwood
a30620d8a9
wired: update with new eap_init
2019-10-11 15:45:25 -05:00
James Prestwood
8f600ee1b5
eap: remove mtu argument from eap_init
...
This was refactored to set the mtu via __eap_set_config rather than
passing the MTU into eap_init. This makes eap work in a similar fashion
as eapol (i.e. __eapol_set_config).
If __eap_set_config is not used, the MTU will be set to 1020, which is
the same as previously passing 0 to eap_init.
2019-10-11 15:44:38 -05:00
James Prestwood
d53dcf2334
wiphy: utilize IWD_MODULE
...
This converts wiphy into an IWD module. nl80211 was completely removed
from main.c as it is no longer passed with manager or wiphy.
2019-10-11 15:42:13 -05:00
James Prestwood
97bac236c8
wiphy: remove white/blacklist from wiphy_init
...
wiphy will now use getters for the phy white/black list.
2019-10-11 15:41:54 -05:00
Denis Kenzior
cc2d4f97e2
manager: Make sure pending_wiphys remains NULL on error
2019-10-11 15:41:16 -05:00