Skip to content
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

sd_pid_notify_with_fds: cmsg_space -> cmsg_len #6100

Closed
cyxgun opened this issue Jun 7, 2017 · 6 comments
Closed

sd_pid_notify_with_fds: cmsg_space -> cmsg_len #6100

cyxgun opened this issue Jun 7, 2017 · 6 comments
Labels
already-implemented bug 🐛 Programming errors, that need preferential fixing sd-daemon

Comments

@cyxgun
Copy link

cyxgun commented Jun 7, 2017

Submission type

  • Bug report

systemd version the issue has been seen with

systemd.x86_64 219-30.el7_3.8

NOTE: Do not submit bug reports about anything but the two most recently released systemd versions upstream!

Used distribution

CentOS 7

In case of bug report: Expected behaviour you didn't see

sd_pid_notify should work

In case of bug report: Unexpected behaviour you saw

Reports EINVAL

In case of bug report: Steps to reproduce the problem

Attempt to use sd_pid_notify with NOTIFY_SOCKET env var set.
Note that at line 526 of sd-daemon.c the use of cmsg_space to set msghdr.msg_controllen instead of cmsg_len can cause the values of msghdr.msg_controllen and cmsg->cmsg_len to be different.

@evverx
Copy link
Member

evverx commented Jun 8, 2017

Thanks for reporting the issue.

Do you know whether the package you are using contains a5bd3c3 or not? Could you show how to reproduce the issue using systemd >= 227?

@evverx evverx added the needs-reporter-feedback ❓ There's an unanswered question, the reporter needs to answer label Jun 8, 2017
@cyxgun
Copy link
Author

cyxgun commented Jun 9, 2017

That changeset does not seem to be in my package; I'll test with something recent. Thanks.

@cyxgun
Copy link
Author

cyxgun commented Jun 9, 2017

Retested with version 232 on Ubuntu 17.04 and it seems to work fine. Sorry for the confusion.

@cyxgun cyxgun closed this as completed Jun 9, 2017
@evverx evverx added already-implemented bug 🐛 Programming errors, that need preferential fixing sd-daemon and removed needs-reporter-feedback ❓ There's an unanswered question, the reporter needs to answer labels Jun 9, 2017
@evverx
Copy link
Member

evverx commented Jun 9, 2017

The bug causes a serious issue described in #2236, so I'm a bit surprised that a5bd3c3 has not been backported yet.

@poettering
Copy link
Member

The bug causes a serious issue described in #2236, so I'm a bit surprised that a5bd3c3 has not been backported yet.

@lnykryn, @msekletar do you know anything about this?

@msekletar
Copy link
Contributor

That commit was already backported but fixed package was not released yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
already-implemented bug 🐛 Programming errors, that need preferential fixing sd-daemon
Development

No branches or pull requests

4 participants