-
Notifications
You must be signed in to change notification settings - Fork 242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bubblewrap misuses CMSG_DATA() macro #637
Comments
Separately, it looks like the
|
smcv
added a commit
to smcv/bubblewrap
that referenced
this issue
Oct 16, 2024
As documented in cmsg(3), the alignment of control messages is not guaranteed, so for portability to architectures with strong alignment requirements we should memcpy to and from a suitably aligned instance of the desired data structure on the stack. Helps: containers#637 Signed-off-by: Simon McVittie <[email protected]>
smcv
added a commit
to smcv/bubblewrap
that referenced
this issue
Oct 16, 2024
A char array on the stack is not guaranteed to have any particular alignment. Resolves: containers#637 Signed-off-by: Simon McVittie <[email protected]>
smcv
added a commit
to smcv/bubblewrap
that referenced
this issue
Oct 17, 2024
As documented in cmsg(3), the alignment of control messages is not guaranteed, so for portability to architectures with strong alignment requirements we should memcpy to and from a suitably aligned instance of the desired data structure on the stack. Helps: containers#637 Signed-off-by: Simon McVittie <[email protected]>
smcv
added a commit
to smcv/bubblewrap
that referenced
this issue
Oct 17, 2024
A char array on the stack is not guaranteed to have any particular alignment. Resolves: containers#637 Signed-off-by: Simon McVittie <[email protected]>
smcv
added a commit
to smcv/bubblewrap
that referenced
this issue
Oct 17, 2024
As documented in cmsg(3), the alignment of control messages is not guaranteed, so for portability to architectures with strong alignment requirements we should memcpy to and from a suitably aligned instance of the desired data structure on the stack. Helps: containers#637 Signed-off-by: Simon McVittie <[email protected]>
smcv
added a commit
to smcv/bubblewrap
that referenced
this issue
Oct 17, 2024
A char array on the stack is not guaranteed to have any particular alignment. Resolves: containers#637 Signed-off-by: Simon McVittie <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
cmsg(3) says:
send_pid_on_socket() and read_pid_from_socket() in bubblewrap's utils.c both cast the return value exactly like the documentation says not to do.
(This should be a very easy newcomers issue.)
The text was updated successfully, but these errors were encountered: