[krbdev.mit.edu #6959] cms_signeddata_verify has unsafe error handling
Sam Hartman via RT
rt-comment at krbdev.mit.edu
Sat Sep 10 09:10:04 EDT 2011
I felt the need to add the following comment to cms_signeddata_verify
/*
* Warning: Since most openssl functions do not set retval, large chunks of
* this function assume that retval is always a failure and may go to
* cleanup without setting retval explicitly. Make sure retval is not set
* to 0 or errors such as signature verification failure may be converted
* to success with significant security consequences.
If anyone accidentally inserted a k5alloc or anything else that set retval, it would be really bad.
I'd recommend refactoring that function.
Since I'm not doing that now I'm opening a bug to track.
More information about the krb5-bugs
mailing list