[From nobody Thu Jun 25 05:55:36 2020
Received: from mr85p00im-zteg06012001.me.com ([17.58.23.197])
 by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux))
 id 1imelz-0007JV-I2
 for openwrt-devel@lists.openwrt.org; Wed, 01 Jan 2020 14:14:57 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=1a1hai;
 t=1577888092; bh=RPhI61x3ZFbxTZeIMRnaBgG1v9GKhU624QNtZGzzZpU=;
 h=Content-Type:Subject:From:Date:Message-Id:To;
 b=u66WQfiyo+L0dxTciK5i1tqGV3zDrT5ce1wWBayW2yhoEDw4Ss6/dzufO1BBTH4mu
 ehtScGOQ0Ph1ClyArqOiNUoRPEWN29s6Py0w0gnKnMZQiUI741mg1MAXbQY+bjH5aA
 XGGtOQy+CNRS8dAydwOL2pRxQYYN3c8Yggl3D0MZ3P9aVKt+ahDzXKd0KR50Y4sEfw
 5tc31OOJoHiymPDMZNCn3+vbvEoxGvoPDIhAs7CgvOoXGvKmWZd7PqkPgwgwbvxkxc
 URciP82rpXVhH3aUnyBkEUcSDm5zfjj4umXPjlSRLTbI6U4TfJyCfbvdJ74ASZscuT
 5eU9duiWx7pRg==
Received: from [192.168.176.103] (78-80-17-93.nat.epc.tmcz.cz [78.80.17.93])
 by mr85p00im-zteg06012001.me.com (Postfix) with ESMTPSA id 44FB3A00E01;
 Wed,  1 Jan 2020 14:14:51 +0000 (UTC)
Content-Type: text/plain;
	charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.40.2.2.4\))
Subject: Re: [OpenWrt-Devel] Sysupgrade possibly broken in recent development
 snapshots: &quot;message&quot;: &quot;Firmware image couldn't be validated&quot;
From: =?utf-8?Q?Petr_Nov=C3=A1k?= &lt;petrn@me.com&gt;
In-Reply-To: &lt;20200101124453.GM70184@meh.true.cz&gt;
Date: Wed, 1 Jan 2020 15:14:47 +0100
Cc: Hannu Nyman &lt;hannu.nyman@welho.com&gt;,
 openwrt-devel@lists.openwrt.org
Content-Transfer-Encoding: quoted-printable
Message-Id: &lt;2DF80201-77E5-4301-9046-67165E5A8B9C@me.com&gt;
References: &lt;mailman.21094.1577616584.2486.openwrt-devel@lists.openwrt.org&gt;
 &lt;20191229222123.GH70184@meh.true.cz&gt; &lt;20191230190746.GI70184@meh.true.cz&gt;
 &lt;357266D6-1E26-4066-AFE5-746C2407B0DF@me.com&gt;
 &lt;20191230225631.GJ70184@meh.true.cz&gt;
 &lt;D18390C9-BACD-441C-BC1F-41CD9B01634E@me.com&gt;
 &lt;20191231095801.GK70184@meh.true.cz&gt;
 &lt;46C7C775-CDBB-4E84-8C7F-A0F949F1F981@me.com&gt;
 &lt;20191231134925.GL70184@meh.true.cz&gt;
 &lt;C9B93DB4-A2CA-455B-8B4F-E7A23E34D141@me.com&gt;
 &lt;20200101124453.GM70184@meh.true.cz&gt;
To: =?utf-8?Q?Petr_=C5=A0tetiar?= &lt;ynezz@true.cz&gt;
X-Mailer: Apple Mail (2.3608.40.2.2.4)
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, ,
 definitions=2020-01-01_04:, , signatures=0
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0
 malwarescore=0
 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 mlxscore=0
 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx
 scancount=1 engine=8.0.1-1908290000 definitions=main-2001010129
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 
X-CRM114-CacheID: sfid-20200101_061455_615524_A1485DAE 
X-CRM114-Status: UNSURE (   7.84  )
X-CRM114-Notice: Please train this message.
X-Spam-Score: -0.9 (/)
X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary:
 Content analysis details:   (-0.9 points)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.7 RCVD_IN_DNSWL_LOW      RBL: Sender listed at https://www.dnswl.org/,
 low trust [17.58.23.197 listed in list.dnswl.org]
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (petrn[at]me.com)
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 SPF_PASS               SPF: sender matches SPF record
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [17.58.23.197 listed in wl.mailspike.net]
 0.1 DKIM_SIGNED            Message has a DKIM or DK signature, not necessarily
 valid
 -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_VALID Message has at least one valid DKIM or DK signature

The updated procd did actually allow the upgrade to proceed:


root@OpenWrt:~# sysupgrade -v =
openwrt-brcm2708-bcm2711-rpi-4-squashfs-sysupgrade.img.gz=20
Image not in /tmp, copying...
Reading partition table from bootdisk...
Reading partition table from image...
Saving config files...
boot/config.txt
etc/config/dhcp
etc/config/dropbear
etc/config/firewall
etc/config/network
etc/config/system
etc/config/wireless
etc/dropbear/dropbear_rsa_host_key
etc/group
etc/hosts
etc/inittab
etc/opkg/keys/0b26f36ae0f4106d
etc/opkg/keys/1035ac73cc4e59e3
etc/opkg/keys/5151f69420c3f508
etc/opkg/keys/72a57f2191b211e0
etc/opkg/keys/792d9d9b39f180dc
etc/opkg/keys/9ef4694208102c43
etc/opkg/keys/b2d571e0880ff617
etc/opkg/keys/b5043e70f9a75cde
etc/opkg/keys/c10b9afab19ee428
etc/opkg/keys/dace9d4df16896bf
etc/opkg/keys/dd6de0d06bbd3d85
etc/opkg/keys/f94b9dd6febac963
etc/passwd
etc/profile
etc/rc.local
etc/shadow
etc/shells
etc/sysctl.conf
Commencing upgrade. Closing all shell sessions.
-&gt; 7b93da68 #7b93da68          hello: {}
&lt;- 7b93da68 #00000000         lookup: {&quot;objpath&quot;:&quot;system&quot;}
-&gt; 7b93da68 #00000000           data: =
{&quot;objpath&quot;:&quot;system&quot;,&quot;objid&quot;:-672961887,&quot;objtype&quot;:-575613211,&quot;signature&quot;:{&quot;=
board&quot;:{},&quot;info&quot;:{},&quot;reboot&quot;:{},&quot;watchdog&quot;:{&quot;frequency&quot;:5,&quot;timeout&quot;:5,&quot;mag=
icclose&quot;:7,&quot;stop&quot;:7},&quot;signal&quot;:{&quot;pid&quot;:5,&quot;signum&quot;:5},&quot;validate_firmware_imag=
e&quot;:{&quot;path&quot;:3},&quot;sysupgrade&quot;:{&quot;path&quot;:3,&quot;force&quot;:7,&quot;backup&quot;:3,&quot;prefix&quot;:3,&quot;comm=
and&quot;:3,&quot;options&quot;:2}}}
-&gt; 7b93da68 #00000000         status: {&quot;status&quot;:0}
&lt;- 7b93da68 #d7e36aa1         invoke: =
{&quot;objid&quot;:-672961887,&quot;method&quot;:&quot;sysupgrade&quot;,&quot;data&quot;:{&quot;prefix&quot;:&quot;/tmp/root&quot;,&quot;pa=
th&quot;:&quot;/tmp/sysupgrade.img&quot;,&quot;backup&quot;:&quot;/tmp/sysupgrade.tgz&quot;,&quot;command&quot;:&quot;/lib/u=
pgrade/do_stage2&quot;,&quot;options&quot;:{&quot;save_partitions&quot;:1}}}
-&gt; 13c8230f #7b93da68         invoke: =
{&quot;objid&quot;:-672961887,&quot;method&quot;:&quot;sysupgrade&quot;,&quot;data&quot;:{&quot;prefix&quot;:&quot;/tmp/root&quot;,&quot;pa=
th&quot;:&quot;/tmp/sysupgrade.img&quot;,&quot;backup&quot;:&quot;/tmp/sysupgrade.tgz&quot;,&quot;command&quot;:&quot;/lib/u=
pgrade/do_stage2&quot;,&quot;options&quot;:{&quot;save_partitions&quot;:1}},&quot;user&quot;:&quot;root&quot;,&quot;group&quot;:&quot;=
root&quot;}
Connection to 172.30.31.233 closed by remote host.



r11869-a176f8d3ec


Then using this current development snapshot it has failed again, and =
then again with just updating procd it has worked correctly. So the =
problem seems to be in procd (or interaction of procd with something =
else - such as libubox).


=E2=80=94 PN

&gt; On 1 Jan 2020, at 13:44, Petr =C5=A0tetiar &lt;ynezz@true.cz&gt; wrote:
&gt;=20
&gt; Petr Nov=C3=A1k &lt;petrn@me.com&gt; [2019-12-31 14:56:13]:
&gt;=20
&gt; I was suspecting some issue in jshn, which empowers the json_dump =
command, but
&gt; it seems, that the JSON passed from =
/usr/libexec/validate_firmware_image back
&gt; to validate_firmware_image_call() looks correct:
&gt;=20
&gt;&gt; {
&gt;&gt; 	&quot;tests&quot;: {
&gt;&gt; 		&quot;fwtool_signature&quot;: true,
&gt;&gt; 		&quot;fwtool_device_match&quot;: true
&gt;&gt; 	},
&gt;&gt; 	&quot;valid&quot;: true,
&gt;&gt; 	&quot;forceable&quot;: true,
&gt;&gt; 	&quot;allow_backup&quot;: true
&gt;&gt; }
&gt;=20
&gt; but validate_firmware_image_call() somehow doesn't get/parse it and =
yields:
&gt;=20
&gt;&gt; {
&gt;&gt; 	&quot;error&quot;: {
&gt;&gt; 		&quot;message&quot;: &quot;Firmware image couldn't be validated&quot;
&gt;&gt; 	}
&gt;&gt; }
&gt;=20
&gt; looking at the validate_firmware_image_call() I really don't see =
anything related to
&gt; libubox which would lead to this error, so can you please try again =
with more
&gt; verbose version of procd[1]? Thanks!
&gt;=20
&gt; 1.  =
https://gitlab.com/ynezz/openwrt/commit/a8db973cc2bcf8d877b939801eba529f29=
ab7d3a
&gt;=20
&gt; -- ynezz


]