bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
* Coverity false positives triggered by gnulib's implementation of base64
@ 2019-05-07 14:22 Kamil Dudka
  2019-05-08  8:15 ` Bruno Haible
  2019-05-09 19:14 ` Paul Eggert
  0 siblings, 2 replies; 16+ messages in thread
From: Kamil Dudka @ 2019-05-07 14:22 UTC (permalink / raw)
  To: bug-gnulib

Coverity Analysis 2019.03 incorrectly marks the input argument 
of base64_encode(), and conseuqnetly base64_encode_alloc(), as
tainted_data_sink because it sees byte-level operations on the input.

It triggered the following false positives in the cryptsetup project:

Error: TAINTED_SCALAR:
lib/luks2/luks2_digest_pbkdf2.c:117: tainted_data_argument: Calling function "crypt_random_get" taints argument "salt".
lib/luks2/luks2_digest_pbkdf2.c:157: tainted_data: Passing tainted variable "salt" to a tainted sink.

Error: TAINTED_SCALAR:
lib/luks2/luks2_keyslot_luks2.c:445: tainted_data_argument: Calling function "crypt_random_get" taints argument "salt".
lib/luks2/luks2_keyslot_luks2.c:448: tainted_data: Passing tainted variable "salt" to a tainted sink.


... but it can affect other gnulib-based projects, too.  Would it be
possible to apply the following one-line patch on gnulib source code
to suppress this class of false positives in gnulib-based projects?

https://gitlab.com/cryptsetup/cryptsetup/commit/75b2610e

Thanks in advance for considering it!

Kamil




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

end of thread, other threads:[~2019-05-10 23:36 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-07 14:22 Coverity false positives triggered by gnulib's implementation of base64 Kamil Dudka
2019-05-08  8:15 ` Bruno Haible
2019-05-09 16:14   ` Kamil Dudka
2019-05-09 20:35     ` Bruno Haible
2019-05-09 21:55       ` Paul Eggert
2019-05-09 22:13         ` Bruno Haible
2019-05-09 22:28           ` Paul Eggert
2019-05-10 11:57           ` Kamil Dudka
2019-05-10 14:11             ` Bruno Haible
2019-05-10 14:32               ` Kamil Dudka
2019-05-10 11:41       ` Kamil Dudka
2019-05-09 19:14 ` Paul Eggert
2019-05-10 11:32   ` Kamil Dudka
2019-05-10 11:34     ` Florian Weimer
2019-05-10 11:51       ` Kamil Dudka
2019-05-10 23:36     ` Paul Eggert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).