| Message ID | 20241016140823.90836-1-stefano.babic@swupdate.org |
|---|---|
| State | Accepted |
| Headers | show
Return-Path: <swupdate+bncBD2ZDGN6SEKRBXMRX64AMGQEK4MQHFI@googlegroups.com>
X-Original-To: incoming@patchwork.ozlabs.org
Delivered-To: patchwork-incoming@legolas.ozlabs.org
Authentication-Results: legolas.ozlabs.org;
dkim=pass (2048-bit key;
unprotected) header.d=googlegroups.com header.i=@googlegroups.com
header.a=rsa-sha256 header.s=20230601 header.b=TvUng3tI;
dkim-atps=neutral
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com
(client-ip=2a00:1450:4864:20::23c; helo=mail-lj1-x23c.google.com;
envelope-from=swupdate+bncbd2zdgn6sekrbxmrx64amgqek4mqhfi@googlegroups.com;
receiver=patchwork.ozlabs.org)
Received: from mail-lj1-x23c.google.com (mail-lj1-x23c.google.com
[IPv6:2a00:1450:4864:20::23c])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384)
(No client certificate requested)
by legolas.ozlabs.org (Postfix) with ESMTPS id 4XTCVr18ZSz1xvV
for <incoming@patchwork.ozlabs.org>; Thu, 17 Oct 2024 01:08:34 +1100 (AEDT)
Received: by mail-lj1-x23c.google.com with SMTP id
38308e7fff4ca-2f75cf9472dsf47089601fa.3
for <incoming@patchwork.ozlabs.org>;
Wed, 16 Oct 2024 07:08:34 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1729087711; cv=pass;
d=google.com; s=arc-20240605;
b=SSUxFt2WRJC0zm3A2RtO06Cp8zRf5FWaaYlf7fRIPshPbvxBxTQKx0d9gSmnFDBZzR
JTn4QNAnBoRT+3kLTIFMiJmggZvcfFNKobBczAxazg7vRP//Lnl5GAYOgAd6386YZ6tf
VHGOtsgYA7HJyaChD44uz2nlsqVezTirdUFM6EAty0o5w1SjYRubcmUOCgQKge98MrKy
zRuifYqCLUAs6+DZBlyjWUpXrZxZwrMMyyxC65C808YDwwQgbrjru8JLGSvWA0+2g2tg
b41IfjymNwVwH4FBgiE1jojicMZzAaHXHkPsNqHKvcSOWhbyGeStP6LcjWiXH0EqDeVU
yDxw==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20240605;
h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
:list-id:mailing-list:precedence:ui-outboundreport:mime-version
:message-id:date:subject:cc:to:from:sender:dkim-signature;
bh=gR1iN1blPRt8pFEUfFNzbqJ1zlsEE66NpfvCVlOOovw=;
fh=zwbqDefj6H1JhihpBGaIvXjNpQuFYPnWOesMnhz9lTw=;
b=DI1AiA+76iQjJ9DF5yjrm7rYz1axgfZRa6tyOltcKR49n8qhXHQF7+LXue+o5YOtXO
T3w0L0PXL2vXSZRaVBB5kcrZjWIhCbTjt0o8FINDnxvO88GmCK5LgfrjB08oozkFdVzt
Hvi7o0XwADCBkNxqoR0cZa3B/JAFYYPfGP3cqTiOYXvjFPtRerKGcf15kjadrVaxZaNN
aQfk/esp3DQvlYtK8fAR86jmJrjMxL8FVhQtWUkPFUdTG9EAzD+o6KAFdbQ1wXG9v2Tz
4sL8eCX8Xho+6boIxhVOhhh84OKyU8mEMHF15vSvU4wAEwd9gtlLz6VzEi9TOLCKlwPl
/Ymw==;
darn=patchwork.ozlabs.org
ARC-Authentication-Results: i=2; gmr-mx.google.com;
dkim=pass header.i=@swupdate.org header.s=s1-ionos header.b=Mh+yKHFZ;
spf=pass (google.com: domain of stefano.babic@swupdate.org designates
217.72.192.75 as permitted sender) smtp.mailfrom=stefano.babic@swupdate.org
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=googlegroups.com; s=20230601; t=1729087711; x=1729692511;
darn=patchwork.ozlabs.org;
h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
:list-id:mailing-list:precedence:x-original-authentication-results
:x-original-sender:ui-outboundreport:mime-version:message-id:date
:subject:cc:to:from:sender:from:to:cc:subject:date:message-id
:reply-to;
bh=gR1iN1blPRt8pFEUfFNzbqJ1zlsEE66NpfvCVlOOovw=;
b=TvUng3tIxM0NNLIN13gSQOQJLvdUDQ3HBK1KaFa46suhk2BZyHS/BnrQlz44soiEvT
1MMjbGEy+e9fnol87/44rKxYW+2ZpAljj3tqbtesWYpJ7cp3niPDIVB5lDVAE/cYLjSZ
m2FMYgu7CeJ/D/MNvjTQKJYxCxxX3S1wl1tBmJcbco6caartAAhdO27s3HWbQ/iW7k6E
PMSOKic2iqeWSr4qXTExNHUUIRbRSOrgFt8PjvRW26eiMEZzra5DTT6+xE7xMqXjbIRx
Yphx8PJWIaNGZfio1ItWUSF97yBFSU1JKE+99+Q58IXUvrNMqMxFkGK46Z9ZYlqGpcrp
GeMA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1729087711; x=1729692511;
h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
:x-spam-checked-in-group:list-id:mailing-list:precedence
:x-original-authentication-results:x-original-sender
:ui-outboundreport:mime-version:message-id:date:subject:cc:to:from
:x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date
:message-id:reply-to;
bh=gR1iN1blPRt8pFEUfFNzbqJ1zlsEE66NpfvCVlOOovw=;
b=kSLk1UxhlreIN8hJPBQfYa2LhWOcgCRaaFcnbcNYpimZI1C4hddrmF+jwI2/0eIBKY
bcWobBlH5QH/bG409BEbC0LqiAr/jqWmNKU32231TB/BZnJC/FspXcmx7MtbWL+eF2sa
/NnySltjcBfrmNF53K8JqEZ8+CaPEr9jNyLFGEPf6zGVHTbX+3Ev2ghhCG1FWraV1i4S
ekrRkSzbwslGJ6v2tpb6nwnFJ+ztNYXMvKJYxeiCG5EdnY9Q5rIETzGl9DykTKN6LfYT
ay5Cy1H5EyctiqYmlFBtFY7qQ0H68F0MPG6FJtDRAfAE/RrQGjjLgjhnEicda96T5svV
75yg==
Sender: swupdate@googlegroups.com
X-Forwarded-Encrypted: i=2;
AJvYcCWyhm+OFaamf+gTKpOD+NACZ4wc5pcYFwdrfqAfWp6ampBt/8PjnHr7idFVcTbLdbJ5gIzWwopUbg==@patchwork.ozlabs.org
X-Gm-Message-State: AOJu0YwyLaJgNCBJKFMWSvGPBnn2CJu4ScgQABneUPJql60jrWnngOF9
j0laIVAsIxQ1aBV7na18dS/9BTembK0DhS6mVH6Z1mtcMqVsrM+7
X-Google-Smtp-Source:
AGHT+IFjiK8y56mngeu1rdY7tha3/iTDxj/OFXFM2v3Jtlzmmlr7v/HViGhZK1HiZjMZkhE5mu4mYA==
X-Received: by 2002:a05:651c:1502:b0:2fb:5ac6:90ef with SMTP id
38308e7fff4ca-2fb61b45d02mr29879811fa.11.1729087710329;
Wed, 16 Oct 2024 07:08:30 -0700 (PDT)
X-BeenThere: swupdate@googlegroups.com
Received: by 2002:a05:6402:4304:b0:5c4:6687:149 with SMTP id
4fb4d7f45d1cf-5c9958e53d5ls55335a12.1.-pod-prod-09-eu; Wed, 16 Oct 2024
07:08:27 -0700 (PDT)
X-Received: by 2002:a05:6402:1e94:b0:5c9:6ed1:38f2 with SMTP id
4fb4d7f45d1cf-5c99518e6fbmr2900636a12.22.1729087707149;
Wed, 16 Oct 2024 07:08:27 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1729087707; cv=none;
d=google.com; s=arc-20240605;
b=XqNjEeGJNmUDWkh8FigZefOX2eLz/cVm/O4RZo+n0z783vIwpe0+YV3A8SV/pwlNVZ
T6k3+B5AcNPQUGZy4yCNewNLUzIZIDDCmQ98lZZ4HGDwtX4pAWp2eNNg0vn5J6yzJa+9
lK8TyrU328Y6XuCTuM8fcXrW+d/2S3ecm3C/88o8NaRvx4hJjt9LZaMI2js9of4HFba1
gXWMo5YNoa1bWNULtvoickLGkVFqzMALlKSjuAbm0PXLEKWNdY20w8ZwFLl69YotSHC/
85VRSqDvxgrAhTjVAPVV++vBXf+Efx06PF7VirJt42/gnMlkLX0VxsKd6Ue5wc5E6qyr
hoVA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20240605;
h=ui-outboundreport:content-transfer-encoding:mime-version:message-id
:date:subject:cc:to:from:dkim-signature;
bh=YhEk2epSOX9uuw2YBJuXdXfnw+7fIWQdJTP4yTcfdAs=;
fh=TiEWcqMcKpHk5s7uErzpntoONrNfOXwKpI5P8bIlggk=;
b=DFrdx1odPLJeTTiFEGgT78iRea60xDOSYGheHRTG8wUjCrrm/G5dm4/ZItnquTHov8
7kHpg2+/Fqn6WtI+QTMWc+rNEOlwkOanYWprP6H8jNHYD+KGi/TQ3UUbtESZUvRGG8J0
58zP8fy4Tqgn39IarkFTdQVBK53KgDqqBBSkuuC52Yf3uxshqRaAmuol1ktikx3/zpYK
ZSYSAZq9UMENa+2qHX1TzBQCtXueJN4J/lQ5jDdU6N4hbwGNgSbcSi+250unvgJ6xWcT
Cj7xZiJsnTLJRpYUNQH8nZP3FSJoPHrEGu79avESAd1CyhdkcJk7hPVvyWo7qGb2JsKQ
ENsA==;
dara=google.com
ARC-Authentication-Results: i=1; gmr-mx.google.com;
dkim=pass header.i=@swupdate.org header.s=s1-ionos header.b=Mh+yKHFZ;
spf=pass (google.com: domain of stefano.babic@swupdate.org designates
217.72.192.75 as permitted sender) smtp.mailfrom=stefano.babic@swupdate.org
Received: from mout.kundenserver.de (mout.kundenserver.de. [217.72.192.75])
by gmr-mx.google.com with ESMTPS id
4fb4d7f45d1cf-5c98d77cce6si52246a12.3.2024.10.16.07.08.26
for <swupdate@googlegroups.com>
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 16 Oct 2024 07:08:27 -0700 (PDT)
Received-SPF: pass (google.com: domain of stefano.babic@swupdate.org
designates 217.72.192.75 as permitted sender) client-ip=217.72.192.75;
X-UI-Sender-Class: 55c96926-9e95-11ee-ae09-1f7a4046a0f6
Received: from paperino.fritz.box ([88.217.136.221]) by
mrelayeu.kundenserver.de (mreue109 [213.165.67.113]) with ESMTPSA (Nemesis)
id 1MSbp1-1tOxLX2G0v-00SDTH; Wed, 16 Oct 2024 16:08:26 +0200
From: Stefano Babic <stefano.babic@swupdate.org>
To: swupdate@googlegroups.com
Cc: Stefano Babic <stefano.babic@swupdate.org>
Subject: [swupdate] [PATCH] BUG: fix segv if eMMC handler is called from Lua
Date: Wed, 16 Oct 2024 16:08:23 +0200
Message-Id: <20241016140823.90836-1-stefano.babic@swupdate.org>
X-Mailer: git-send-email 2.34.1
MIME-Version: 1.0
X-Provags-ID: V03:K1:V/KVmlwyTbxb4Ae5DHz+3wfwca0Er2wHw03tzfg9STQ7H0a/Vvx
rgYmZdNZnLGntoOMsjhnsreAZhB1u4Ae2TamczKgrvm6ONOMNsq/+8/k8tWFJnJJnVkHBui
/ged/udR0mzAbNIL2s4cR/r5HC7uZN2baP1CaQT7WOrrSAhV2BWoizDSQUqcx6aO/qo2nLy
Vmvb9wsMqpRW5LlXEiLYw==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:6k0nbY2OiPY=;O3mBhMMtra1A5vM8njtBLTXCp4u
R8neibTGGsX1hYcqLbYIhlloHI/u4Zz3n8lultTMklWa3bPqXK3APgkPyFVs3FsrqkqUZsF8k
FalpBKmaR/p48U0zYKRKzee93juwBStxqY98yAtCT2S6gBqeeKE7HiL/LIAbHCK0NxGCWe1tt
xgZ60LtkTkqJB7E21Tljb6Q474Fgwokdmu39LHOAj01TtbPAICgF9DOhcKkFxDxu5rv/EdCfC
wZ0Ze4lgSPI5pKKM/TS5JaeqvIEuuCLQpD8/q1iyhgVJWcf+Id5dCUuoeAr7iWj5xu8KSHbPU
FSNnWHq9NqHDJj/GR604nLBN2422q+adGg+cYAbR8PAzEqyB/fL3be0riWkikjVBmN8498xuc
nT+dIvG2Sfv0C18NFz67sz2J6ZvyMr6bvlKYb+5TK8jnQ5wQ78nI5ofUDNheBbBSZDl98XG7E
57J5tyUobV0Nfk3Fv5OP2Mx8XixL9ONtml9KQr5/lU05Q2YnHeWIHEGtxu+UsGBeuZLNt7vMc
2k7dYYRl4RrgG7oU5uXXssF1D8GnhxVD4k7QVBbJHO27VpUOCF0W4OViap0YMu2buGH87DSPB
WiG8kxYp7tJWnnOgmlOTDy755VlgpOAamKbL55VfMcuo74s2ij4wPXZPbSBCXOkmpE3/RA/t1
tKmSNQfrqNS3d5PVLf+Krt+bvJYCmJIg2sRB87/TGcZHsrVG3XrzpxOsmnnxjvXgbShOT+kxd
y4mtK/TVq6akUfPhvRYpfoa+pzuMao3Uw==
X-Original-Sender: stefano.babic@swupdate.org
X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass
header.i=@swupdate.org header.s=s1-ionos header.b=Mh+yKHFZ; spf=pass
(google.com: domain of stefano.babic@swupdate.org designates 217.72.192.75 as
permitted sender) smtp.mailfrom=stefano.babic@swupdate.org
Content-Type: text/plain; charset="UTF-8"
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 |
BUG: fix segv if eMMC handler is called from Lua
|
expand
|
diff --git a/handlers/emmc_csd_handler.c b/handlers/emmc_csd_handler.c index f6e8e2cf..23732cb1 100644 --- a/handlers/emmc_csd_handler.c +++ b/handlers/emmc_csd_handler.c @@ -47,6 +47,9 @@ static int emmc_csd_set(struct img_type *img, void *data, bool toggle) struct script_handler_data *script_data = data; char tmpdev[SWUPDATE_GENERAL_STRING_SIZE]; + if (!script_data) + return -EINVAL; + if (script_data->scriptfn == PREINSTALL) return 0;
There is support for chained image/file handler, not for script handler. The handler should check (as all other script handlers are doing) to receive a correct structure, else should exit. This fixes a SEGV because data structure is accessed. Signed-off-by: Stefano Babic <stefano.babic@swupdate.org> --- handlers/emmc_csd_handler.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.34.1