Generated calls to IPC Recv methods that pass Tainted data
Categories
(Core :: IPC, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox75 | --- | fixed |
People
(Reporter: tjr, Assigned: tjr)
References
(Blocks 1 open bug)
Details
Attachments
(3 files, 3 obsolete files)
After Bug 1610007, this is for actually doing something with the tainted keyword.
Assignee | ||
Comment 1•6 years ago
|
||
Assignee | ||
Comment 2•6 years ago
|
||
Assignee | ||
Comment 3•6 years ago
|
||
Comment 4•6 years ago
|
||
re: https://bugzilla.mozilla.org/attachment.cgi?id=9122448&action=diff, could you also include the corresponding .cpp
changes? I don't think the signature you declared there will be compatible with the generated code which you're passing in.
re: https://bugzilla.mozilla.org/attachment.cgi?id=9122450&action=diff, is this the code you are wanting to create? It seems surprising to me that you'd want to move each argument into a Tainted
temporary as you're passing them into the method.
Giving feedback on the exact code will be easier with the actual code for the Tainted
template, as right now I don't know how it behaves with certain types, such as references, used as a type parameter.
Assignee | ||
Comment 5•6 years ago
|
||
(In reply to :Nika Layzell (ni? for response) from comment #4)
re: https://bugzilla.mozilla.org/attachment.cgi?id=9122448&action=diff, could you also include the corresponding
.cpp
changes? I don't think the signature you declared there will be compatible with the generated code which you're passing in.
Yes, I think you're right. I will fiddle some more. (My environment just broke so I have to fix it first.)
re: https://bugzilla.mozilla.org/attachment.cgi?id=9122450&action=diff, is this the code you are wanting to create? It seems surprising to me that you'd want to move each argument into a
Tainted
temporary as you're passing them into the method.
I am less familiar with the nuances of stuff like std::move and std::forward and rrvalues. I thought it was, but if it surprised you then it probably isn't. If we taint stuff I can omit a move (if it was going to be present) if that's the correct course of action.
Giving feedback on the exact code will be easier with the actual code for the
Tainted
template, as right now I don't know how it behaves with certain types, such as references, used as a type parameter.
Bug 1610039 has the template
Assignee | ||
Comment 6•6 years ago
|
||
Attached is the codegen change on the cpp file, as well as the edits I made to the in-tree subclass.
Note that this code doesn't work. The .cpp call to RecvProgressChange is passing a long
; while the RecvProgressChange declaration expects a const long&
. The type of the argument being passed is known to the codegen as a long, so we generate a Tainted<long>
which cannot be implicitly cast to a Tainted<const long&>
.
I'm not sure what the correct solution to this is, but it seems related to the move into the temporary, so I'm going to await feedback.
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 7•6 years ago
|
||
Assignee | ||
Comment 8•6 years ago
|
||
Comment 10•5 years ago
|
||
bugherder |
Description
•