Skip to content

Commit

Permalink
wpa-supplicant: refresh patches to apply on 2.9 version
Browse files Browse the repository at this point in the history
:Release Notes:
It doesn't apply since last CVE patch for 2.9:
https://git.openembedded.org/openembedded-core/commit/?id=81e4260b83c52558c320fd7d1c1eafcb312ad6be

:Detailed Notes:
Fixes:
ERROR: wpa-supplicant-2.9-r0 do_patch: Fuzz detected:

Applying patch 0001-Add-p2p-changes.patch
patching file src/ap/drv_callbacks.c
patching file src/ap/hostapd.c
patching file src/ap/hostapd.h
patching file src/ap/sta_info.c
patching file src/ap/wpa_auth.c
patching file src/common/ieee802_11_defs.h
patching file src/p2p/p2p.c
Hunk #1 succeeded at 1314 (offset 2 lines).
Hunk #2 succeeded at 1322 (offset 2 lines).
Hunk #3 succeeded at 1631 (offset 2 lines).
Hunk #4 succeeded at 1742 (offset 2 lines).
Hunk #5 succeeded at 1781 (offset 2 lines).
Hunk #6 succeeded at 2981 (offset 2 lines).
Hunk #7 succeeded at 3256 (offset 2 lines).
Hunk #8 succeeded at 4606 (offset 2 lines).
Hunk #9 succeeded at 4625 (offset 2 lines).
Hunk #10 succeeded at 4660 (offset 2 lines).
Hunk #11 succeeded at 4771 (offset 2 lines).
patching file src/p2p/p2p.h
patching file src/p2p/p2p_build.c
patching file src/p2p/p2p_go_neg.c
patching file src/p2p/p2p_group.c
patching file src/p2p/p2p_invitation.c
patching file src/p2p/p2p_pd.c
Hunk #1 succeeded at 602 with fuzz 2 (offset -2 lines).
patching file src/wps/wps_attr_build.c
patching file src/wps/wps_defs.h
patching file src/wps/wps_i.h
patching file wpa_supplicant/ap.c
patching file wpa_supplicant/dbus/dbus_new.c
patching file wpa_supplicant/dbus/dbus_new.h
patching file wpa_supplicant/dbus/dbus_new_handlers.c
patching file wpa_supplicant/dbus/dbus_new_handlers.h
patching file wpa_supplicant/dbus/dbus_new_handlers_p2p.c
patching file wpa_supplicant/dbus/dbus_new_handlers_p2p.h
patching file wpa_supplicant/notify.c
patching file wpa_supplicant/notify.h
patching file wpa_supplicant/p2p_supplicant.c
patching file wpa_supplicant/p2p_supplicant.h
patching file wpa_supplicant/wpa_supplicant.c

The context lines in the patches can be updated with devtool:

    devtool modify wpa-supplicant
    devtool finish --force-patch-refresh wpa-supplicant <layer_path>

Don't forget to review changes done by devtool!

ERROR: wpa-supplicant-2.9-r0 do_patch: QA Issue: Patch log indicates that patches do not apply cleanly. [patch-fuzz]

:Testing Performed:
Only build tested.

:QA Notes:
No change to image.

:Issues Addressed:
[PLAT-122546] Create GPVB with Yocto 3.2 Gatesgarth
[PLAT-138245] CCC: Upgrade to latest revisions from Yocto 3.1 Dunfell

Change-Id: I162cd574bf1e0f49674008ef97c990e7ae3954ec
  • Loading branch information
shr-project authored and Hyunjae Shin committed Jun 21, 2021
1 parent 8757e9e commit 37a95a5
Showing 1 changed file with 18 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From d86b9021e1556b0a114100ca0ef165ef80389696 Mon Sep 17 00:00:00 2001
From 4ea5d446e9725bbbccd3182fd4cd58f479f6865f Mon Sep 17 00:00:00 2001
From: "penikelapati.kumar" <[email protected]>
Date: Wed, 27 Jan 2021 18:56:41 +0530
Subject: [PATCH] Add p2p changes
Expand All @@ -22,6 +22,7 @@ N/A
and p2p/setgointent Luna API

Upstream-Status: Inappropriate[webos specific]

---
src/ap/drv_callbacks.c | 11 ++
src/ap/hostapd.c | 23 ++++
Expand Down Expand Up @@ -245,18 +246,18 @@ index b0aa913..7446deb 100644
/* P2P action frames */
enum p2p_act_frame_type {
diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c
index a08ba02..b98ce7a 100644
index 079270f..3047220 100644
--- a/src/p2p/p2p.c
+++ b/src/p2p/p2p.c
@@ -1312,6 +1312,7 @@ void p2p_stop_find_for_freq(struct p2p_data *p2p, int freq)
@@ -1314,6 +1314,7 @@ void p2p_stop_find_for_freq(struct p2p_data *p2p, int freq)
p2p->go_neg_peer = NULL;
p2p->sd_peer = NULL;
p2p->invite_peer = NULL;
+ p2p->p2p_scan_running = 0;
p2p_stop_listen_for_freq(p2p, freq);
p2p->send_action_in_progress = 0;
}
@@ -1319,6 +1320,10 @@ void p2p_stop_find_for_freq(struct p2p_data *p2p, int freq)
@@ -1321,6 +1322,10 @@ void p2p_stop_find_for_freq(struct p2p_data *p2p, int freq)

void p2p_stop_listen_for_freq(struct p2p_data *p2p, int freq)
{
Expand All @@ -267,7 +268,7 @@ index a08ba02..b98ce7a 100644
if (freq > 0 && p2p->drv_in_listen == freq && p2p->in_listen) {
p2p_dbg(p2p, "Skip stop_listen since we are on correct channel for response");
return;
@@ -1624,15 +1629,26 @@ int p2p_connect(struct p2p_data *p2p, const u8 *peer_addr,
@@ -1626,15 +1631,26 @@ int p2p_connect(struct p2p_data *p2p, const u8 *peer_addr,
dev->go_neg_req_sent = 0;
dev->go_state = UNKNOWN_GO;
p2p_set_dev_persistent(dev, persistent_group);
Expand Down Expand Up @@ -296,7 +297,7 @@ index a08ba02..b98ce7a 100644

if (p2p->p2p_scan_running) {
p2p_dbg(p2p, "p2p_scan running - delay connect send");
@@ -1724,6 +1740,11 @@ void p2p_add_dev_info(struct p2p_data *p2p, const u8 *addr,
@@ -1726,6 +1742,11 @@ void p2p_add_dev_info(struct p2p_data *p2p, const u8 *addr,
}
}

Expand All @@ -308,7 +309,7 @@ index a08ba02..b98ce7a 100644
if (msg->wfd_subelems) {
wpabuf_free(dev->info.wfd_subelems);
dev->info.wfd_subelems = wpabuf_dup(msg->wfd_subelems);
@@ -1758,9 +1779,12 @@ void p2p_build_ssid(struct p2p_data *p2p, u8 *ssid, size_t *ssid_len)
@@ -1760,9 +1781,12 @@ void p2p_build_ssid(struct p2p_data *p2p, u8 *ssid, size_t *ssid_len)
{
os_memcpy(ssid, P2P_WILDCARD_SSID, P2P_WILDCARD_SSID_LEN);
p2p_random((char *) &ssid[P2P_WILDCARD_SSID_LEN], 2);
Expand All @@ -323,7 +324,7 @@ index a08ba02..b98ce7a 100644
}


@@ -2955,7 +2979,8 @@ struct p2p_data * p2p_init(const struct p2p_config *cfg)
@@ -2957,7 +2981,8 @@ struct p2p_data * p2p_init(const struct p2p_config *cfg)
p2p->dev_capab |= P2P_DEV_CAPAB_INVITATION_PROCEDURE;
if (cfg->concurrent_operations)
p2p->dev_capab |= P2P_DEV_CAPAB_CONCURRENT_OPER;
Expand All @@ -333,7 +334,7 @@ index a08ba02..b98ce7a 100644

dl_list_init(&p2p->devices);

@@ -3229,6 +3254,9 @@ void p2p_continue_find(struct p2p_data *p2p)
@@ -3231,6 +3256,9 @@ void p2p_continue_find(struct p2p_data *p2p)
struct p2p_device *dev;
int found, res;

Expand All @@ -343,7 +344,7 @@ index a08ba02..b98ce7a 100644
p2p_set_state(p2p, P2P_SEARCH);

/* Continue from the device following the last iteration */
@@ -4576,10 +4604,8 @@ static void p2p_ext_listen_timeout(void *eloop_ctx, void *timeout_ctx)
@@ -4578,10 +4606,8 @@ static void p2p_ext_listen_timeout(void *eloop_ctx, void *timeout_ctx)
p2p_ext_listen_timeout, p2p, NULL);
}

Expand All @@ -356,7 +357,7 @@ index a08ba02..b98ce7a 100644
p2p_dbg(p2p, "Operation in progress - skip Extended Listen timeout (%s)",
p2p_state_txt(p2p->state));
return;
@@ -4597,6 +4623,14 @@ static void p2p_ext_listen_timeout(void *eloop_ctx, void *timeout_ctx)
@@ -4599,6 +4625,14 @@ static void p2p_ext_listen_timeout(void *eloop_ctx, void *timeout_ctx)
p2p_set_state(p2p, P2P_IDLE);
}

Expand All @@ -371,7 +372,7 @@ index a08ba02..b98ce7a 100644
if (p2p->state != P2P_IDLE) {
p2p_dbg(p2p, "Skip Extended Listen timeout in active state (%s)", p2p_state_txt(p2p->state));
return;
@@ -4624,13 +4658,13 @@ int p2p_ext_listen(struct p2p_data *p2p, unsigned int period,
@@ -4626,13 +4660,13 @@ int p2p_ext_listen(struct p2p_data *p2p, unsigned int period,
eloop_cancel_timeout(p2p_ext_listen_timeout, p2p, NULL);

if (interval == 0) {
Expand All @@ -387,7 +388,7 @@ index a08ba02..b98ce7a 100644
period, interval);
p2p->ext_listen_period = period;
p2p->ext_listen_interval = interval;
@@ -4735,6 +4769,7 @@ int p2p_set_listen_channel(struct p2p_data *p2p, u8 reg_class, u8 channel,
@@ -4737,6 +4771,7 @@ int p2p_set_listen_channel(struct p2p_data *p2p, u8 reg_class, u8 channel,
reg_class, channel);

if (p2p->state == P2P_IDLE) {
Expand Down Expand Up @@ -645,12 +646,12 @@ index 77d662a..51b8582 100644
p2p->op_reg_class, p2p->op_channel);

diff --git a/src/p2p/p2p_pd.c b/src/p2p/p2p_pd.c
index 3994ec0..40e7680 100644
index 05fd593..027cdfc 100644
--- a/src/p2p/p2p_pd.c
+++ b/src/p2p/p2p_pd.c
@@ -604,6 +604,13 @@ void p2p_process_prov_disc_req(struct p2p_data *p2p, const u8 *sa,
goto out;
}
@@ -602,6 +602,13 @@ void p2p_process_prov_disc_req(struct p2p_data *p2p, const u8 *sa,
MACSTR, MAC2STR(sa));
goto out;
}
+
+ dev = p2p_get_device(p2p, sa);
Expand Down Expand Up @@ -1680,6 +1681,3 @@ index 911d79d..7323d58 100644
dump_freq_data(wpa_s, "completed iteration", freqs_data, idx);
return idx;
}
--
2.26.0

0 comments on commit 37a95a5

Please sign in to comment.