Skip to content

Conversation

@kkysen
Copy link
Contributor

@kkysen kkysen commented Mar 11, 2025

donna is down, so I'm testing this in CI.

@fw-immunant, is this what you meant?

@kkysen kkysen requested a review from fw-immunant March 11, 2025 06:33
@kkysen kkysen force-pushed the kkysen/type-confusion-clearer-comments branch from f95ed89 to 67d148b Compare March 13, 2025 03:07
@kkysen kkysen force-pushed the kkysen/type-confusion-dav1d_alloc branch from fafd42b to ae6537d Compare March 13, 2025 03:07
@fw-immunant fw-immunant self-assigned this Mar 14, 2025
@kkysen kkysen force-pushed the kkysen/type-confusion-clearer-comments branch from 67d148b to 5c011ca Compare May 7, 2025 00:53
@kkysen kkysen force-pushed the kkysen/type-confusion-dav1d_alloc branch from ae6537d to b1b4f96 Compare May 7, 2025 00:53
@kkysen kkysen force-pushed the kkysen/type-confusion-clearer-comments branch from 5c011ca to 4e542e6 Compare May 7, 2025 08:07
@kkysen kkysen force-pushed the kkysen/type-confusion-dav1d_alloc branch from b1b4f96 to b5ebf18 Compare May 7, 2025 08:07
@kkysen kkysen force-pushed the kkysen/type-confusion-clearer-comments branch from 4e542e6 to 7ebe5f4 Compare May 7, 2025 20:47
@kkysen kkysen force-pushed the kkysen/type-confusion-dav1d_alloc branch from b5ebf18 to 2b58f15 Compare May 7, 2025 20:47
@kkysen kkysen force-pushed the kkysen/type-confusion-clearer-comments branch from 7ebe5f4 to 7f46f97 Compare May 9, 2025 08:54
@kkysen kkysen force-pushed the kkysen/type-confusion-dav1d_alloc branch from 2b58f15 to 5d9020b Compare May 9, 2025 08:54
@kkysen kkysen force-pushed the kkysen/type-confusion-clearer-comments branch from 7f46f97 to 66f2a9b Compare May 10, 2025 10:11
@kkysen kkysen force-pushed the kkysen/type-confusion-dav1d_alloc branch from 5d9020b to b700442 Compare May 10, 2025 10:11
Copy link
Contributor

@fw-immunant fw-immunant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was suggesting individual wrappers for the dav1d initializer-type functions that would return new, allocated-and-initialized objects and be marked as the constructor for the given type. That said, this also achieves the same memory ownership for the allocated objects, which is the main point: the caller can create objects but can only modify them via the dav1d compartment's API, not by poking at their bytes directly.

@kkysen
Copy link
Contributor Author

kkysen commented May 12, 2025

I was suggesting individual wrappers for the dav1d initializer-type functions that would return new, allocated-and-initialized objects and be marked as the constructor for the given type.

Correct me if I'm wrong, but I thought we had settled on a more generic dav1d_alloc/dav1d_free being simpler than individual wrappers for each type. Although this was a while ago so I don't remember too much, and I might be remembering wrong.

That said, this also achieves the same memory ownership for the allocated objects, which is the main point: the caller can create objects but can only modify them via the dav1d compartment's API, not by poking at their bytes directly.

Is this way good then? Or what changes did you want me to still make?

@kkysen kkysen force-pushed the kkysen/type-confusion-dav1d_alloc branch from b700442 to 22950e5 Compare May 12, 2025 17:03
@kkysen kkysen force-pushed the kkysen/type-confusion-clearer-comments branch from 66f2a9b to b0c0dbf Compare May 13, 2025 17:57
@kkysen kkysen force-pushed the kkysen/type-confusion-dav1d_alloc branch from 22950e5 to b12bbd9 Compare May 13, 2025 17:57
@kkysen kkysen force-pushed the kkysen/type-confusion-clearer-comments branch from b0c0dbf to 1ce0acd Compare May 21, 2025 03:40
@kkysen kkysen force-pushed the kkysen/type-confusion-dav1d_alloc branch from b12bbd9 to 505dd81 Compare May 21, 2025 03:40
@kkysen kkysen force-pushed the kkysen/type-confusion-clearer-comments branch from 1ce0acd to 40de6dd Compare May 21, 2025 06:45
@kkysen kkysen force-pushed the kkysen/type-confusion-dav1d_alloc branch from 505dd81 to 0d8e10e Compare May 21, 2025 06:45
@kkysen kkysen force-pushed the kkysen/type-confusion-clearer-comments branch from 40de6dd to 38d6c95 Compare May 22, 2025 11:14
@kkysen kkysen force-pushed the kkysen/type-confusion-dav1d_alloc branch from 0d8e10e to ea7cc30 Compare May 22, 2025 11:14
@kkysen kkysen force-pushed the kkysen/type-confusion-clearer-comments branch from 38d6c95 to 5f25c18 Compare May 27, 2025 14:09
@kkysen kkysen force-pushed the kkysen/type-confusion-dav1d_alloc branch from ea7cc30 to 4e3e681 Compare May 27, 2025 14:09
@fw-immunant
Copy link
Contributor

Is this way good then? Or what changes did you want me to still make?

Given discussions we've had, I think we should probably just merge this approach when tests pass; what I really wanted was going to need something like #485 but that was mostly a matter of aesthetics.

@kkysen kkysen force-pushed the kkysen/type-confusion-clearer-comments branch from 5f25c18 to 3f30552 Compare June 17, 2025 17:56
@kkysen kkysen force-pushed the kkysen/type-confusion-dav1d_alloc branch from 4e3e681 to 07c1c28 Compare June 17, 2025 17:56
Base automatically changed from kkysen/type-confusion-clearer-comments to main June 17, 2025 17:58
kkysen added 2 commits June 17, 2025 10:58
…_DATA`

This lets us not have to explain `IA2_SHARED_DATA`
and better showcases how an untrusted compartment
could exploit completely opaque types from another compartment.
@kkysen kkysen force-pushed the kkysen/type-confusion-dav1d_alloc branch from 07c1c28 to 017054a Compare June 17, 2025 17:58
@kkysen kkysen merged commit f56ecc4 into main Jun 17, 2025
69 of 70 checks passed
@kkysen kkysen deleted the kkysen/type-confusion-dav1d_alloc branch June 17, 2025 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants