Created attachment 3428 [details] Package with bad signature 1. Problem Boot a target environment with rpm: 1). With option '--nodigest --nosignature', installing package with bad signature failed ====== root@localhost:~# rpm -ivh --nodigest --nosignature hello-bogus.rpm error: hello-bogus.rpm: Header V4 DSA signature: BAD, key ID 09753bc ====== 2). Without option '--nodigest --nosignature', installing package with bad signature is successful ====== root@localhost:~# rpm -ivh hello-bogus.rpm Preparing... ########################################### [100%] 1:hello ########################################### [100%] root@localhost:~# rpm -q hello hello-1.0-r1.1.x86_64 ====== 2. Expected: ====== root@localhost:~# rpm -ivh hello-bogus.rpm error: hello-bogus.rpm: Header V4 DSA signature: BAD, key ID 09753bca root@localhost:~# rpm -ivh --nodigest --nosignature hello-bogus.rpm Preparing... ########################################### [100%] 1:hello ########################################### [100%] ======
I've fixed --query, I think that we also need fix --install/--upgrade: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=51b08835b64421669e018481e344effe4727183b
(In reply to comment #1) > I've fixed --query, I think that we also need fix --install/--upgrade: > > http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/ > ?id=51b08835b64421669e018481e344effe4727183b We should make sure rpm upgrade should work: Preprae two version hello with bad signature 1. Install hello with version 1.0-r1.0 root@localhost:~# rpm -ivh --nodigest --nosignature hello-1.0-r1.0.corei7_64.rpm Preparing... ########################################### [100%] 1:hello ########################################### [100%] root@localhost:~# rpm -F --verbose hello-1.0-r2.0.corei7_64.rpm error: hello-1.0-r2.0.corei7_64.rpm: Header V4 DSA signature: BAD, key ID 8a0274fa 2. Upgrade hello with version 1.0-r2.0 root@localhost:~# rpm -F --verbose --nodigest --nosignature hello-1.0-r2.0.corei7_64.rpm Preparing packages for installation... hello-1.0-r2.0.corei7_64 root@localhost:~# rpm -q hello hello-1.0-r2.0.corei7_64 //Hongxu
BTW: How to prepare rpm package with bad singnature vim rpm pacakge(such as hello-1.0-r1.0.corei7_64.rpm) Tweak any single character before -----END PGP PUBLIC KEY BLOCK----- //Hongxu
As noted in the mailing list. The problem is that apparently a previous change activated some normally deactivated code to allow signature by-pass. The previous code was implemented in reverse, i.e. signature/digest validation was always deactivated instead of always activated. This permits a corrupted package to avoid validation and install. As noted on the mailing list by Hongxu, the fix for this issue would be to correct the validation arguments, so the default is enabled, and the --no* options disable the default. Alternatively we disable the previous patch and go back to the community setting avoiding this chunk of code.
Hongxu, Does WR care about this bug?
Build move to 5.0 -- ../Randy
Bulk move of 5.0 medium importance issues to 5.99. Move to 5.1 if you want to actively work on an issue.
Build move to 5.1
Bulk move of all unassigned 5.2 medium importance bugs to 5.3.
Robert, Is this still a problem with rpm6 ?
Bulk move of 6.0 Medium bugs to 6.1.