A Bug in Disk Tainting?

22 views
Skip to first unread message

M Chen

unread,
Jul 19, 2017, 3:35:02 PM7/19/17
to decaf-platform-discuss
Hello, 

Thanks for your time, I have a question about Decaf disk tainting. 

At code: https://github.com/sycurelab/DECAF/blob/master/decaf/hw/ide/pci.c line 138: I found that Decaf calls taintcheck_chk_hdread() after pci_dma_write(); and calls taintcheck_chk_hdwrite() after pci_dma_read(). 

If I understand it correctly, the codes act as: 
    when Qemu does dma write, Decaf will check the disk taint (if any); and when Qemu does dma read, Decaf taints the disk file via taintcheck_chk_hdwrite().

However, shouldn't it be the reversed logic? That is, when Qemu does a write, Decaf will taint the target disk file during which; when Qemu does a read, Decaf will check if the file being read is tainted or not?

Or I misunderstand the behavior of Decaf disk tainting?

Thanks,
Michael Chen

Heng Yin

unread,
Jul 20, 2017, 5:12:28 AM7/20/17
to decaf-platform-discuss
pci_dma_read means a PCI device reads from memory. In other words, it is writing into the device. 

Heng

--
You received this message because you are subscribed to the Google Groups "decaf-platform-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to decaf-platform-di...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages