[panda-users] taint labelset iteration

Manolis Stamatogiannakis mstamat at gmail.com
Mon Aug 1 11:06:32 EDT 2016


Actually no. Worked like a charm after enabling.

I was expecting it was some incorrect argument, but I got mixed signals
trying to figure it out:

USAGE.md doesn't mention the default value for pos (sentence cuts off).
The flag is initialized to true "bool positional_labels = true;". So if you
stop reading there, you assume this should be the default.
But it isn't. The value is overwritten with the return value of
panda_parse_bool() which defaults to false.

Will send a pull request to prevent more people from slipping :)

Thanks!

M.


2016-08-01 16:47 GMT+02:00 Brendan Dolan-Gavitt <brendandg at nyu.edu>:

> Are you using the "pos" option to file_taint to use a different label for
> each byte in the file?
>
>
> On Monday, August 1, 2016, Manolis Stamatogiannakis <mstamat at gmail.com>
> wrote:
>
>> Thanks!
>> I'm using the file_taint plugin to apply taint.
>>
>> 2016-08-01 14:29 GMT+02:00 Hulin, Patrick - 0559 - MITLL <
>> Patrick.Hulin at ll.mit.edu>:
>>
>>> I think I can guess what the problem is. One second – let me take a look.
>>>
>>>
>>>
>>> *From:* panda-users-bounces at mit.edu [mailto:panda-users-bounces at mit.edu]
>>> *On Behalf Of *Manolis Stamatogiannakis
>>> *Sent:* Monday, August 01, 2016 7:30 AM
>>> *To:* panda-users at mit.edu
>>> *Subject:* [panda-users] taint labelset iteration
>>>
>>>
>>>
>>> Hello,
>>>
>>>
>>>
>>> I'm using the tain2 plugin and I'm trying to iterate over the taint
>>> labels of a buffer.
>>>
>>> My code looks like this:
>>>
>>>
>>>
>>> for (int32_t i=0; i<buflen; i++) {
>>>
>>> uint32_t pa = panda_virt_to_phys(env, buf+i);
>>>
>>> taint2_labelset_ram_iter(pa, label_print, NULL);
>>>
>>> }
>>>
>>>
>>>
>>> static int label_print(uint32_t el, void *sup) {
>>>
>>> std::cout << " " << el;
>>>
>>> return 0;
>>>
>>> }
>>>
>>>
>>>
>>> What doesn't seem right is that always the same value of 1 is printed.
>>> Am I missing something in the API/configuration that prevents this from
>>> working?
>>>
>>>
>>>
>>> Thanks,
>>>
>>> M.
>>>
>>
>>
>
> --
> Brendan Dolan-Gavitt
> Assistant Professor, Department of Computer Science and Engineering
> NYU Tandon School of Engineering
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/panda-users/attachments/20160801/ca3eb5db/attachment-0001.html


More information about the panda-users mailing list