qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] coverity-model: replay data is considered trusted
@ 2018-05-14 14:12 Paolo Bonzini
  2018-05-14 14:14 ` no-reply
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Paolo Bonzini @ 2018-05-14 14:12 UTC (permalink / raw)
  To: qemu-devel; +Cc: Pavel Dovgalyuk, Markus Armbruster

Replay data is not considered a possible attack vector; add a model that
does not use getc so that "tainted data" warnings are suppressed.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 scripts/coverity-model.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/scripts/coverity-model.c b/scripts/coverity-model.c
index c702804f41..576f48de33 100644
--- a/scripts/coverity-model.c
+++ b/scripts/coverity-model.c
@@ -103,6 +103,19 @@ static int get_keysym(const name2keysym_t *table,
     }
 }
 
+
+/* Replay data is considered trusted.  */
+uint8_t replay_get_byte(void)
+{
+     uint8_t byte = 0;
+     if (replay_file) {
+         uint8_t c;
+         byte = c;
+     }
+     return byte;
+}
+
+
 /*
  * GLib memory allocation functions.
  *
-- 
2.17.0

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

end of thread, other threads:[~2018-06-26  8:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-14 14:12 [Qemu-devel] [PATCH] coverity-model: replay data is considered trusted Paolo Bonzini
2018-05-14 14:14 ` no-reply
2018-05-15 12:00 ` Markus Armbruster
2018-05-15 12:06   ` Paolo Bonzini
2018-05-15 14:33     ` Markus Armbruster
2018-06-26  7:27 ` Markus Armbruster
2018-06-26  7:55   ` Paolo Bonzini
2018-06-26  8:55     ` Markus Armbruster

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 NNTP newsgroup(s).