Linux cryptographic layer development
 help / color / mirror / Atom feed
* BUG: drbg: Added nodes from Stack Memory in link list
@ 2017-05-03 12:47 Harsh Jain
  2017-05-03 13:11 ` Stephan Müller
  0 siblings, 1 reply; 5+ messages in thread
From: Harsh Jain @ 2017-05-03 12:47 UTC (permalink / raw)
  To: Stephan Mueller, linux-crypto, Herbert Xu

Hi Stephen,

In drbg driver local variable of function are added as list nodes. one
instance is given below.


static inline int __init drbg_healthcheck_sanity(void)



---
---

max_addtllen = drbg_max_addtl(drbg);
max_request_bytes = drbg_max_request_bytes(drbg);
drbg_string_fill(&addtl, buf, max_addtllen + 1);
/* overflow addtllen with additonal info string */
len = drbg_generate(drbg, buf, OUTBUFLEN, &addtl);

===> Added "addtllist"  to the tail. which local variable.


BUG_ON(0 < len);
/* overflow max_bits */
len = drbg_generate(drbg, buf, (max_request_bytes + 1), NULL);
BUG_ON(0 < len);

/* overflow max addtllen with personalization string */
ret = drbg_seed(drbg, &addtl, false);

====> Added "seedlist" to the tail of same list. Previous
node(addtllist) already invalid(Out of scope when function returns)


BUG_ON(0 == ret);
/* all tests passed */
rc = 0;



Is't a BUG? or I missed something.


Regards
Harsh Jain

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-05-08  9:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-03 12:47 BUG: drbg: Added nodes from Stack Memory in link list Harsh Jain
2017-05-03 13:11 ` Stephan Müller
2017-05-08  6:30   ` Harsh Jain
2017-05-08  8:30     ` Stephan Müller
2017-05-08  9:21       ` Harsh Jain

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox