]> git.karo-electronics.de Git - karo-tx-linux.git/commit
digsig: add hash size comparision on signature verification
authorDmitry Kasatkin <dmitry.kasatkin@intel.com>
Wed, 12 Sep 2012 10:26:55 +0000 (13:26 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Oct 2012 17:39:10 +0000 (10:39 -0700)
commitdf4d11d1581f21352b2a727c2a62ede4f0aa48b7
tree36ad5dfdb32ebeb6f98118631224ef132717bc17
parent99c9bffe490072ec4a1b72bc7ca7c6c7048e2c9b
digsig: add hash size comparision on signature verification

commit bc01637a80f5b670bd70a0279d3f93fa8de1c96d upstream.

When pkcs_1_v1_5_decode_emsa() returns without error and hash sizes do
not match, hash comparision is not done and digsig_verify_rsa() returns
no error.  This is a bug and this patch fixes it.

The bug was introduced in v3.3 by commit b35e286a640f ("lib/digsig:
pkcs_1_v1_5_decode_emsa cleanup").

Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
lib/digsig.c