-
Notifications
You must be signed in to change notification settings - Fork 169
Another invalid memory accesses in some ldv benchmarks #554
Comments
@mchalupa, could you please make it more concrete by creating a pull request? |
I don't know if in all these benchmarks modified in #556 the |
@mchalupa |
If they were |
@mutilin : Yes, that is what am I reporting -- an invalid access to memory. |
In such settings the tool which reports
For the competition I think we should require that the state violating memsafety property terminates the path. It will allow to eliminate undefined behaviour from consideration in |
If you are asking for exploits, we might just keep it simple. Just link the following against the benchmarks: void ldv_initialize()
{
__VERIFIER_error();
} That's me making use of undefined behaviour without even resorting to memory errors.
Could you please elaborate? I don't understand what this means. |
So use this, but do not refer to memory errors!
All paths which violate some property are aborted and can not be used as a prefix for violation of any other property. |
Memory errors are undefined behavior...
This could be a nice assumption for the multi-property category which has been discussed for some time, but so far in the rules we have that exactly one property is violated in a benchmark. Invalid dereference is undefined behavior and as such you can not assume that the program is just killed there (although it is a common case). You can not, in fact, assume anything and that is the problem.
I thought the general consensus is that if a benchmark violates false-valid-deref (and at least these five benchmarks do), then it should not contain any other label. So if nothing else, these benchmarks are mislabeled. |
I do not see such requirement in the rules. You can even see examples like
Well, not all memsafety properties. Even
There is no general consensus There are examples like |
Regarding benchmarks contained in the directory |
Yes, my bad, I formulated it incorrectly, what I said holds only for MemSafety category. The rest of the sentence, however, still holds. What I meant to say is that some lables are quite incompatible, like false-valid-deref and anything else. (btw. I also do not see a rule that says that "the state violating memsafety property terminates the path".)
OK, so fast I could find only these two links, which may not be very convincing: #480 #485 (comment) |
Anyway, I think that the conversation is starting diverging from the original topic, which is that the reported benchmarks contain invalid memory accesses (whatever it means for the unreach-call label). |
I cannot understand the original witness that was posted here. It seems to end at the statement I was able to run a recent version of UAutomizer on the program. Our tool claims that the program is not However after look at this more carefully, I found out that our tool complains about a cast from a pointer to a long which is then incremented by 16 and cast back to a pointer. This is not undefined behaviour but implementation defined. |
The witness describes just a prefix of the error path. |
The benchmark
ldv-linux-3.4-simple/32_1_cilled_true-unreach-call_ok_nondet_linux-3.4-32_1-drivers--input--touchscreen--penmount.ko-ldv_main0_sequence_infinite_withcheck_stateful.cil.out.c
contains multiple invalid dereferences. On this link you can find a witness for one of the errors (invalid dereference on line 2852, due to the fact thatdev_get_drvdata
is undefined): https://gist.github.com/mchalupa/d1a01facc40d21662a28a5de5d0aec75 . I was able to verify the witness with this command:(CPAchecker is also able to find this error itself if set up to search for memory safety errors).
Another problem with this benchmark is that the function
input_allocate_device
is undefined. If we assume that it can return any pointer, there is an invalid dereference on the line 3030 (in the witness file, change thetmp___0 == 2
assumption totmp___0 == 0
).The same problems are also in these benchmarks:
For the undefined
input_allocate_device
function there should be quite an easy fix, but I'm not sure what to do with thedev_get_drvdata
.The text was updated successfully, but these errors were encountered: