Message ID | 20200206111000.889-5-ceggers@arri.de |
---|---|
State | Accepted |
Headers | show
Return-Path: <swupdate+bncBAABBP7I57YQKGQEHMODHDY@googlegroups.com> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::33c; helo=mail-wm1-x33c.google.com; envelope-from=swupdate+bncbaabbp7i57yqkgqehmodhdy@googlegroups.com; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=arri.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20161025 header.b=Lo1Z/v71; dkim-atps=neutral Received: from mail-wm1-x33c.google.com (mail-wm1-x33c.google.com [IPv6:2a00:1450:4864:20::33c]) (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 ozlabs.org (Postfix) with ESMTPS id 48Cwhz3Gr4z9sRG for <incoming@patchwork.ozlabs.org>; Thu, 6 Feb 2020 22:10:59 +1100 (AEDT) Received: by mail-wm1-x33c.google.com with SMTP id 205sf640780wmc.6 for <incoming@patchwork.ozlabs.org>; Thu, 06 Feb 2020 03:10:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1580987456; cv=pass; d=google.com; s=arc-20160816; b=XtP8MqkHSueI3MuTd40LGJJjjkpC9srzGfhR1SMBmBh00PAC+PatQlIYJZFO7XsyN7 PXMQz51sQsDBRsweQ3tKipQHsds9GHVIQAL/rL0E6GMADI8Nrcrla6ExqViCOC33SoHA wBhYkhz9J/poaVXttGefnY+dSMvPS9iWt7h6fahem8fNt3VnCHtKOryyUDenzLtUuhyR PaGLtH4brhqX5WJ6jdsvw5xnmM1cBDdUTeABGWk8icOhpNoa+Nh+M2H2MPBGU73dyStC Eytc3QULA5fVL2LrtKa6EOuA7/l9Tu8n22MVMkwv4501xriAudnmbAHCbD5J4Ailxx4r w9Lw== 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=bHwfLwubYLArr9mNCVn9KAGW6JgzyA5GH5kAxbcaRMM=; b=LxehlTl4zaa4P4rRjFuCQHwdUHOKY1+/TaemHnuz12/bnX2dmrilSU7P0oC9f8PIOd pNXxunkaHXSwkOHXXOB1i3+poax0w7w1aRmFKchWDbF3qONa/9UWgyXuA3VNItMoZjwq 7b2N4wV1mdgwWD7LfAjRkahT7tMgnEjbJ/Za5q+yy1yL35IwQLE7C7adZa96MxHczGd5 xqdIlC3Re17/bazotnJ2euiEwDwf5lccGzWen7pnKLHTPTRYfv4nYJ+q3jJ0Uk0R9krl l5saR7JYfYYsQ4G8Pm1uw+3U+jZyNPpl6TOZ1ytO5OV7qk4WWJGAJj7vYO3vzaZy/yf1 SgXA== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of ceggers@arri.de designates 94.199.88.101 as permitted sender) smtp.mailfrom=CEggers@arri.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; 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=bHwfLwubYLArr9mNCVn9KAGW6JgzyA5GH5kAxbcaRMM=; b=Lo1Z/v71KTKKJvtkt5rgs3IO2bOcsIzlKZi2TRjo5wvr8gOH5WDhSHH/CPbSTHHM2o W9K3sE1wwGx8RUcQOodUS9rxaPIkJWO2lvVNQHyIggdMiJ7TVAydkrT5vc6pvRV1sK/f TM6daFGC0eCNGG1/EzTxle9o4Zu09G4mYd+yWwJ1Fh10OypSNJwFqDaCTptOV7QlyybR Pii7XsK/aSTqz5JAMIv9cfCT8CM6nPT78k68STTh/zXheOd3xnXsugbEfQ+86708ipE9 5VWdSedWh99vSOP+tQ7FVXfEmLdY2AJgu/EAvyzHTmTUqO3euHYn9wHArSq5sVMUP3bO +OEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; 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=bHwfLwubYLArr9mNCVn9KAGW6JgzyA5GH5kAxbcaRMM=; b=t7vOtYysX7lOMSKvSld7/TPA0SATuNylOna0MaoJFwThl8ykk4OXRXj/2HfEZ5gH3O qSdKupLuRUFb0Shmb57hY3vsWYOk2bQhy2JNeMEJQH6tZ0k3HgaARCcBZ0psOwd3dkiJ uEKZzZ/37/Cy5VlRk7cxvlHcSu7YKC5783Qw2NZGTIrE23svCpN59drDUhbCzqiYVZCy ntSPA5Y4rHLzu9fRwpX0YdTinDy+L1c3JszG5Ua304xvtX30tRI7v1AKkap5fQYYIhDy HMVBp9laSOUvBnQFJX6euFDVlCEzl4XIwuoTlExiSQoXoE/6P/KTHE8VHq2Cx6CVH/sX qehg== Sender: swupdate@googlegroups.com X-Gm-Message-State: APjAAAW/GZD5Phl8PT7CDyP7Or7+29996vkpPMmKZ5UmDE/8TbaR+M0p l1YEhXJyxdET+V/Vve0jaNE= X-Google-Smtp-Source: APXvYqza+tVOmYQrkjQKtTvcKw4ugcZwIoDQjgWR9nEDYix/Y+F7sYfD3Nk98RWgf5H5tC/O9bB5ww== X-Received: by 2002:a05:6000:1187:: with SMTP id g7mr3317139wrx.109.1580987456052; Thu, 06 Feb 2020 03:10:56 -0800 (PST) X-BeenThere: swupdate@googlegroups.com Received: by 2002:adf:eb4c:: with SMTP id u12ls3542631wrn.6.gmail; Thu, 06 Feb 2020 03:10:55 -0800 (PST) X-Received: by 2002:a5d:4651:: with SMTP id j17mr3291487wrs.237.1580987455365; Thu, 06 Feb 2020 03:10:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580987455; cv=none; d=google.com; s=arc-20160816; b=rTdxx477lRPQ6KPGm1sBDCI+oi6ZXKFWFtIdEiLABA1QhxEvFbs+zutRJ9D4t+YDKP PkEwcFB56YmWU7mPuNebptoAdx+dvK346dB5Cq29jAPcyB7L+ucprs8YYT36tDcTPuzC gsI2zmz6zGv9BVwQeGDJ1Zg1yVJXZ27qFZKpUJwvvPLB06jMXs0VEZKBr3k839/VXtmA D9dJC6BrKn0XEwVkb19Ye2OKWmwrka75u1VNol62WqgI0F9YTwVlejf+k9VUWzG/FhVm fSFGCTnxZUOMx74385e6t9WmvL2eGMffr8GaxmAOI017ZhQW/EH2O0hxSb+UhbalTAiV ipnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=CLmBEyd5V9tnNhrutQE6LnYAlZ4hNmeyO131J/OugbA=; b=dlyWPx2jWAWlNvbcOQPQHb9GMaRs/qgVDCdvlJN4CnlZLN/I+wqaOLF2osQpRZguxF UXzleZxVF0SUm7psMRC38KEPeRGmYkZCStwuFzBMNeb25jOWXuNvvkOptI0eDiQX4mue zaCL87S8OSGBV5RH/EwoKMFda9pCeoxmuGxxVuOLbMDHZhbbEs7x2nmoh7fu1DF8gZCr t92DdoCVRJ55ahBPBsCwcET/HHpdQ2XwMvdDsGZjflIadozNV1abmeZZi0gCZtDIQoxO QUkD/mfERYqU+IPlB33KawX4SGQ2nwukxPby64NNOaBo1MM/EZktkkQZtcNpLnUEmCSq m9Fg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of ceggers@arri.de designates 94.199.88.101 as permitted sender) smtp.mailfrom=CEggers@arri.de Received: from mailout03.rmx.de (mailout03.rmx.de. [94.199.88.101]) by gmr-mx.google.com with ESMTPS id 202si123121wme.0.2020.02.06.03.10.55 for <swupdate@googlegroups.com> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Feb 2020 03:10:55 -0800 (PST) Received-SPF: pass (google.com: domain of ceggers@arri.de designates 94.199.88.101 as permitted sender) client-ip=94.199.88.101; Received: from kdin01.retarus.com (kdin01.dmz1.retloc [172.19.17.48]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mailout03.rmx.de (Postfix) with ESMTPS id 48Cwhs3ZZFzlbpF for <swupdate@googlegroups.com>; Thu, 6 Feb 2020 12:10:53 +0100 (CET) Received: from ppmail.arri.de (unknown [217.111.95.7]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by kdin01.retarus.com (Postfix) with ESMTPS id 48Cwhf4sGVz2yvv for <swupdate@googlegroups.com>; Thu, 6 Feb 2020 12:10:42 +0100 (CET) Received: from mta.arri.de ([192.168.100.141]) by ppmail.arri.de over TLS secured channel with Microsoft SMTPSVC(7.0.6002.18264); Thu, 6 Feb 2020 12:10:18 +0100 Received: from N95HX1G2.arri.de (192.168.201.254) by mta.arri.de (192.168.100.104) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 6 Feb 2020 12:10:17 +0100 From: Christian Eggers <ceggers@arri.de> To: <swupdate@googlegroups.com> CC: <ceggers@gmx.de>, Christian Eggers <ceggers@arri.de> Subject: [swupdate] [PATCH 4/5] swupdate-sysrestart: Fix potential buffer overflow Date: Thu, 6 Feb 2020 12:09:59 +0100 Message-ID: <20200206111000.889-5-ceggers@arri.de> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20200206111000.889-1-ceggers@arri.de> References: <20200206111000.889-1-ceggers@arri.de> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Originating-IP: [192.168.201.254] X-OriginalArrivalTime: 06 Feb 2020 11:10:18.0233 (UTC) FILETIME=[03D35690:01D5DCDE] X-RMX-ID: 20200206-121052-48Cwhf4sGVz2yvv-0@kdin01 X-RMX-SOURCE: 217.111.95.7 X-Original-Sender: ceggers@arri.de X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ceggers@arri.de designates 94.199.88.101 as permitted sender) smtp.mailfrom=CEggers@arri.de Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: <swupdate.googlegroups.com> X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: <https://groups.google.com/group/swupdate/post>, <mailto:swupdate@googlegroups.com> List-Help: <https://groups.google.com/support/>, <mailto:swupdate+help@googlegroups.com> List-Archive: <https://groups.google.com/group/swupdate List-Subscribe: <https://groups.google.com/group/swupdate/subscribe>, <mailto:swupdate+subscribe@googlegroups.com> List-Unsubscribe: <mailto:googlegroups-manage+605343134186+unsubscribe@googlegroups.com>, <https://groups.google.com/group/swupdate/subscribe> |
Series |
Another bunch of build fixes
|
expand
|
diff --git a/tools/swupdate-sysrestart.c b/tools/swupdate-sysrestart.c index 480a51e..57328e3 100644 --- a/tools/swupdate-sysrestart.c +++ b/tools/swupdate-sysrestart.c @@ -67,7 +67,7 @@ static void restart_system(unsigned int ndevs) { int dev; CURL *curl_handle; /* CURL handle */ - char url[100]; + char url[NI_MAXHOST + 20]; CURLcode curlrc; struct ifaddrs *ifaddr, *ifa; char local[NI_MAXHOST];
A single item of ipaddrs[] can be up to NI_MAXHOST bytes long. Fixes: 8ef2946d71 ("tools: swupdate-sysrestart to restart system") Signed-off-by: Christian Eggers <ceggers@arri.de> --- tools/swupdate-sysrestart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)