]> git.baikalelectronics.ru Git - kernel.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)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 13 Sep 2012 01:13:02 +0000 (09:13 +0800)
commit1ac68f5827ff272a00c395e1d741507a05d657f2
tree55913071b502e2adc7a2dd4daf3b5b92c5e06b65
parentcb47aa03bb574907f6e2c0fbf9b79be888decac4
digsig: add hash size comparision on signature verification

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 c2c528441d69 ("lib/digsig:
pkcs_1_v1_5_decode_emsa cleanup").

Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
lib/digsig.c