Re: Why are we testing an intermediate result in ahash?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/05/2018 03:50 AM, Herbert Xu wrote:
On Fri, Mar 02, 2018 at 03:11:52PM -0600, Gary R Hook wrote:
Commit 466d7b9f6 (cryptodev-2.6) added code to testmgr to populate, for
async hash operations, the result buffer with a known value and to test the
buffer against that value at intermediate steps. If the result buffer
changes the operation is failed.

My question is: why?

The problem is that you must not touch the result buffer unless
you're doing a finalisation.  Indeed, the caller may have provided
a NULL pointer for what it's worth.

Cheers,


Good thing I'm not afraid of appearing dense.

Where is this documented? Has this requirement always been thus, and only the recent patch is testing for it? -Why- mustn't we touch that buffer?

As for a NULL pointer, our driver checks for that, so that's not an issue. Although I get your point.





[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux