From patchwork Thu Jan 3 15:47:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Khatri X-Patchwork-Id: 1020376 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="qzTcR2B6"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="fGwOmhnL"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43Vsl04S0Bz9s9G for ; Fri, 4 Jan 2019 02:48:12 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=bD8S7h1Qhbfpq2krTn/It2LRGftHsvNH3MqaCyQN4ho=; b=qzTcR2B6kLXIwa nb6G1DPkdJNRE8mB2bv9Ht8fZ+L88GUCNjH3azVPZdwi7c/OA+c3PdH2VRKH2dooLY77i8AaUI0u5 YLo6aS7OOtNXwDWt9Keeia/tAMhvk5XfGAJHJ65yW0edvVQjme5IyMe2KiEK/Gp/jGPN9pLHy4g9y RU+iDSCSl+4ql58nK8wpoRwO2BeDCPuCtgIZr4Rd0lnAbxJC/FIOKtMH3pAG0MT/crqjTocx+r2bD uzJXFNK7xzhHwXUVBfySIKaCXQdJcfEIHkZmMb81o6pLNIHRoPIG5+K8kzKsFR6D1o+552RuZoLDd WPsBZ9UdH9dvT9hnlVfg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gf5E2-00026u-69; Thu, 03 Jan 2019 15:48:02 +0000 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gf5Dz-00026D-MC for hostap@lists.infradead.org; Thu, 03 Jan 2019 15:48:01 +0000 Received: by mail-pg1-x52f.google.com with SMTP id g189so16164180pgc.5 for ; Thu, 03 Jan 2019 07:47:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=LhHZy2qecGI+JcLqUzn456Gy9exfvNHQo2gqbvABrt4=; b=fGwOmhnLDMYB9Q5PymQe2uabcaToqCKMOyYduJfK5DP/g41VPg3gukhPyB7xeMSh0C OHupcaaFluUwLXtIUFy/1owl/OhWTe77UoVZZbN0BuKnxE8DJTqXlz/PGlnzIHRwgB1H dON94vLaoLFqrbdE0uW+nLh1QiXCxKMMmucrqzzwZ6H7YaFh+GUQhigw47BkLxJOXkzF S0gkv734MzN0W/bWVGegIqW4UlfKV3r4Oau6NEGoPPoKAnJ37KmCMQXD0epJzl79jIgc cI4iF0UfMCLdJza6C6PJhHSUtV4EG3OT1tS8O41bza4qTeFJxQ+ERs/TLKGgErYaBm/o izzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=LhHZy2qecGI+JcLqUzn456Gy9exfvNHQo2gqbvABrt4=; b=UV9hIf4FN9D57TdzM3NPlnTsEP0vqzGOr5H8aXjcHCtYnE4x8/wAGFxPJoBdU+7L3S k89S+zkYuxkH1MZrzQj22yuJM3wfhpzbc1vJ44wbgUQ8FCzgWIBbm5qzAXXEgU0pN95Z EqnipwgdnyKiN+DYF6rVyu4kLkewQe0fzqUdmVWtc/PolELGg6vSUpvTk0BkHv3Lr8k2 TDaPPNmPNzqk6g1vbblXotMVq+8Hp5fVeVtZzmE7KDvzhMGjRwLyc89K+vCqitiKDvmC bmDbkl5opawe+b2ZF74eZPgrSVSvyvLaymk6iCdAbdmxr0iKCEaCctRiajXEYKExepSz Gwug== X-Gm-Message-State: AA+aEWYuixjXEUSEMw1UhZ53Fc/yAGinoebSdCsVVs253HtdrDy9nP4J WP9eBd0deX/807SehchKDlonMvNp X-Google-Smtp-Source: AFSGD/U0cb0eQPScLZyS1fiY7c0f9Q4O0U6QP2mBvQr30f9vvvYhh9GX2nWA8LX8vLcxvc9nGaSRCg== X-Received: by 2002:a62:442:: with SMTP id 63mr47893382pfe.156.1546530478314; Thu, 03 Jan 2019 07:47:58 -0800 (PST) Received: from localhost.localdomain ([106.215.41.142]) by smtp.gmail.com with ESMTPSA id c72sm99348237pfb.107.2019.01.03.07.47.56 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 03 Jan 2019 07:47:57 -0800 (PST) From: Amit Khatri To: hostap@lists.infradead.org Subject: [PATCH] P2P: Notify dbus about removing of stale group id Date: Thu, 3 Jan 2019 21:17:26 +0530 Message-Id: <1546530446-9877-1-git-send-email-amit7861234@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1546529300-7475-1-git-send-email-amit7861234@gmail.com> References: <1546529300-7475-1-git-send-email-amit7861234@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190103_074759_755221_B326C426 X-CRM114-Status: GOOD ( 11.12 ) X-Spam-Score: 0.1 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:52f listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (amit7861234[at]gmail.com) 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (amit7861234[at]gmail.com) -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org During PD request processing wpa_supplicant remove stale group. but not notifying to dbus for persistent group to unregister object. Some time it cause to crash in wpa_config_get_all() function. because during persistent group register "wpas_dbus_register_persistent_group" -> "wpa_dbus_register_object_per_iface" if DBUS_ERROR_OBJECT_PATH_IN_USE error occur; this indicate dbus knows object name; It should not happen; e.g. register a object on wpa_supplicant startup /fi/w1/wpa_supplicant1/PersistentGroups/3 but some how 3 numbered id removed during PD request processing of stale group. which tends to DBUS_ERROR_OBJECT_PATH_IN_USE error. and you execute GetAll properties of PersistentGroups/3 could crash wpa_supplicant Signed-off-by: Amit Khatri --- wpa_supplicant/p2p_supplicant.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index 3049894..a85853e 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -3918,6 +3918,8 @@ static int wpas_remove_stale_groups(void *ctx, const u8 *peer, const u8 *go, /* Remove stale persistent group */ if (s->mode != WPAS_MODE_P2P_GO || s->num_p2p_clients <= 1) { + wpa_dbg(wpa_s,MSG_ERROR,"Removing stale group ssid id = %d",s->id); + wpas_notify_persistent_group_removed(wpa_s,s); wpa_config_remove_network(wpa_s->conf, s->id); save_config = 1; continue;