From patchwork Mon Nov 22 10:07:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dominique Martinet X-Patchwork-Id: 1557942 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20210112 header.b=dXR8Qj43; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2607:f8b0:4864:20::d3e; helo=mail-io1-xd3e.google.com; envelope-from=swupdate+bncbcwivbv7sugrbt6x5wgamgqehc6begy@googlegroups.com; receiver=) Received: from mail-io1-xd3e.google.com (mail-io1-xd3e.google.com [IPv6:2607:f8b0:4864:20::d3e]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HyNH72Nk9z9sWJ for ; Mon, 22 Nov 2021 21:07:15 +1100 (AEDT) Received: by mail-io1-xd3e.google.com with SMTP id w16-20020a5d8a10000000b005e241c13c7bsf10530913iod.3 for ; Mon, 22 Nov 2021 02:07:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1637575632; cv=pass; d=google.com; s=arc-20160816; b=goWfcpeeUzF6K3rJJUBr6protkFQwfRJ/6rz2aofCIkLxgPwye34wDEx9jpCcMjVyw pEbdyV8mfPPtPtDQ3qNgQQGd49zJcB4EephY6cpfr+z0/DHqVLr9TxhpbA4oWLS5Ut5k Ia1BOhQeXoFICYI4EBSwtSmQkuDIHJYBeVp5D8zib6m6o7BoUGWtWHVkg/GfA8NVbZzT DU2vi+p+evGaf9Vbh1E6ugGtpTUGCSCT+0vFfBArul32qa66uHryJKTUz0ZuZ2BImwUx 5LwaZUHlltlAiUsIHe1hEw46V2vPdffNA4bB3rcSjrtopSCNSoWk/Zm1aOL8lBwOBD29 NbFQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=r86k4DyusDoGb0HNV0dZ0Bghg2zyFS5DtMXvr0Imq40=; b=KZwD5TTgwMjhS0mNJwnbAIYv7acSBBAv/WkNz1iGKZfqaBFLKlIJ3nl6zgkfkPXHMF 6GKkBggMkSKS9mZKCc0tlDUc10IbqxHngdh2rRrz0LVaDG8WAPZwPCRKT9ztizaZNmqe dHLHKPQkbt6k52mI7MLs8S65wlWajNNm2t3T7zrhNySWwftAG70omvOZHFb/YBh4ZMf8 Zu461cZfh6V2yAOfzsbnOqYaX13oTuQaLS/VII+L6wMddDC8oeDMmrhOI+YRkxW/EUJC fY4/qTFip5x/vl7Km7pFCLcUQQtmDZgKKg1ZqLQonV/t/X6klKDb1nZmQBMnXg+9Zf6A nZ2g== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of dominique.martinet@atmark-techno.com designates 35.74.137.57 as permitted sender) smtp.mailfrom=dominique.martinet@atmark-techno.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=r86k4DyusDoGb0HNV0dZ0Bghg2zyFS5DtMXvr0Imq40=; b=dXR8Qj43iI/0KwKirNzOVfgNC8wWl3xsGUsUujCHLwnOjKaASh1xxanFYenzsbs8N0 NIHJphFasLe4Pgsxk8bFkR8ZQwMy6wW4yHo3AlekixfYY5V81WjDQruvWCPGyGcMDgoS RuuBmW+Uwlac1AztHgF/Bqewnz2C3wcwQacnCjSNwY3uLnDv863LgssYP9p2pzSBfJae 8eEgbY7SxfD+1hO1R/J0eIjSk+q10qhs3OKscVIop+g7GKoA5JG67YjL9fYZXgc489WM C3MlEHXcm1Y8T0SGT+n8LUnmRSq43hzaqJ2DxDBS+TDHykBNTIiLknlxaVKGM58n9DXw Y6Og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=r86k4DyusDoGb0HNV0dZ0Bghg2zyFS5DtMXvr0Imq40=; b=mar0wf25NuQWz433zHHtcXwXqSgdUX1cUUiJ32zwwFvwSLj6ELLvypRxrLCvSD/aQO gY6MFANG0Qin8hYcuMU0p/jASSh71CQNHyOjc98AZefRE4l0Lx8/lLk+qyV7NpS+ImtY /Rx2pJL9QC3LXylusGT/sz9U5Of6k68njs9QncxatnFIN2PoCr+469vkngmA82Hhh1Si lNVhWHMST2FnwqI6P84uPRjbsdlcPfNT3bQNf90xINyIdJ3mEwSKXvwfEhCqulN39wby B3TEBIRTSe7SainrQnStMExSkYAUp1dEkx1HAyY1SVNuCO/5LzbmPWqsbVUQtyX9IQpt u30g== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM530By/wchlbm2wzzjIVnD/xAQ+evG4mb3RIP8CJYpbN4Ft34GlRt Nryw7T71OkqaAITQVXFPOtc= X-Google-Smtp-Source: ABdhPJwKOI6dw1APJuGjme+Fsj0Y0dWAmdL/ZN0AKSThwpl4tPQ1IiX2DA5flnABEDbyxj+wtwv4aw== X-Received: by 2002:a92:d701:: with SMTP id m1mr17528514iln.301.1637575631916; Mon, 22 Nov 2021 02:07:11 -0800 (PST) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a5d:9d96:: with SMTP id ay22ls791356iob.10.gmail; Mon, 22 Nov 2021 02:07:11 -0800 (PST) X-Received: by 2002:a5e:d602:: with SMTP id w2mr21530707iom.121.1637575631232; Mon, 22 Nov 2021 02:07:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1637575631; cv=none; d=google.com; s=arc-20160816; b=y0OSpukexd5cxuoDtcZUfr1TvHZDUgvHZ2iQuz1mSgUIl+srAC4myyyhdnGAlyfhee GkhI63zwx102x9JxN1LwwuIvw7ZQ1qbU0IAqMY1uKKxegjYucaARjnZht+Ovo5d2Us4i TGtiz7icxUzgRPBd13+Beapn6sUgARg1a+xGHEtn9WExrqaWAJ/zfegO6NTk+wILqSE1 rcZRgqZWf48qzd2AsZSMwh3XwFeKqyc/mq4WbhJ7jqBOHMNIaE2bYAzksEeCG0eoVSLP +BZs5n4bzAMg8s7265IDs9krc6gyv8e1UDv1WideVROLh6yIXEAWwMilU9HZvRjGc+bQ CpYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=9/JGQExHv5fdOd9fc2UC4aQFhGYJ3hhR9L0zKZBwCCg=; b=J6nHjb+dz7jhkDnqNRAjk9sOT46h84+V2xpcJQOWyc9YPHRjv1cgmtOZjYLbD+uYPB WA/HJhU9DILa3KHrwUzfxvT+s6sTt5LYnPOrDP9cIKtqO88kxq9U6ABd0ZfK1FPK1A0J 1GQcPwrlBuDXg35Rt3fiLciEJ0wVCEqdIPgWwr6J8M+kY78vCPJ+8Iy+nuDb3nFRjRA3 FQhYSVNDieulJw9MHKyNng7UHaRIwrONu4XKz9QBQARGL6RcCIetS7k9FuNubNtwwADQ mf7nC20rFNq7IGaJ7d3ixbt8ZY+AbyCDt9TZRkYozW6A91UwjXdgzd9rOy1API+BjFPV /yDQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of dominique.martinet@atmark-techno.com designates 35.74.137.57 as permitted sender) smtp.mailfrom=dominique.martinet@atmark-techno.com Received: from gw2.atmark-techno.com (gw2.atmark-techno.com. [35.74.137.57]) by gmr-mx.google.com with ESMTP id f19si458102iox.3.2021.11.22.02.07.11 for ; Mon, 22 Nov 2021 02:07:11 -0800 (PST) Received-SPF: pass (google.com: domain of dominique.martinet@atmark-techno.com designates 35.74.137.57 as permitted sender) client-ip=35.74.137.57; Received: from gw2.atmark-techno.com (localhost [127.0.0.1]) by gw2.atmark-techno.com (Postfix) with ESMTP id CB40920D4B for ; Mon, 22 Nov 2021 19:07:09 +0900 (JST) Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by gw2.atmark-techno.com (Postfix) with ESMTPS id B01BE20D4B for ; Mon, 22 Nov 2021 19:07:09 +0900 (JST) Received: by mail-pj1-f71.google.com with SMTP id x3-20020a17090a1f8300b001a285b9f2cbso5753043pja.6 for ; Mon, 22 Nov 2021 02:07:09 -0800 (PST) X-Received: by 2002:a65:5202:: with SMTP id o2mr1412782pgp.210.1637575628839; Mon, 22 Nov 2021 02:07:08 -0800 (PST) X-Received: by 2002:a65:5202:: with SMTP id o2mr1412766pgp.210.1637575628670; Mon, 22 Nov 2021 02:07:08 -0800 (PST) Received: from pc-0115 (35.112.198.104.bc.googleusercontent.com. [104.198.112.35]) by smtp.gmail.com with ESMTPSA id l4sm8606098pfc.121.2021.11.22.02.07.08 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Nov 2021 02:07:08 -0800 (PST) Received: from martinet by pc-0115 with local (Exim 4.94.2) (envelope-from ) id 1mp6E7-00Be8u-AN; Mon, 22 Nov 2021 19:07:07 +0900 From: Dominique Martinet To: swupdate@googlegroups.com Cc: Dominique Martinet Subject: [swupdate] [PATCH 2/2] network_notifier: fix partial initialization of ipcmsg Date: Mon, 22 Nov 2021 19:07:06 +0900 Message-Id: <20211122100706.2775865-1-dominique.martinet@atmark-techno.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211122031619.2202449-1-dominique.martinet@atmark-techno.com> References: <20211122031619.2202449-1-dominique.martinet@atmark-techno.com> MIME-Version: 1.0 X-Original-Sender: dominique.martinet@atmark-techno.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of dominique.martinet@atmark-techno.com designates 35.74.137.57 as permitted sender) smtp.mailfrom=dominique.martinet@atmark-techno.com Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , ipcmsg.data.msg is a small part of the union (128 bytes of 2048+), so the send_notify_msg below sends uninitalized bytes over the socket. These are normally not accessed so it is not an important fix, but might as well fix valgrind warnings Signed-off-by: Dominique Martinet --- This is 100% unrelated, I should probably have sent separately but ran out of time today, sorry -- feel free to ignore this one if you're not interested. core/network_thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/network_thread.c b/core/network_thread.c index c16775d37763..4dd3ec27ae8f 100644 --- a/core/network_thread.c +++ b/core/network_thread.c @@ -207,7 +207,7 @@ static void network_notifier(RECOVERY_STATUS status, int error, int level, const ipcmsg.magic = IPC_MAGIC; ipcmsg.type = NOTIFY_STREAM; - memset(ipcmsg.data.msg, 0, sizeof(ipcmsg.data.msg)); + memset(&ipcmsg.data, 0, sizeof(ipcmsg.data)); strncpy(ipcmsg.data.notify.msg, newmsg->msg, sizeof(ipcmsg.data.notify.msg) - 1);