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

Fixed out-of-bounds reads and writes. #796

Closed
wants to merge 1 commit into from
Closed

Fixed out-of-bounds reads and writes. #796

wants to merge 1 commit into from

Conversation

alejandro-colomar
Copy link
Contributor

This patch fixes out-of-bounds reads and writes by placing some checks in the
right place.  However, this is only a workaround, and proper fixing requires:

-  Changing nxt_sprintf() to detect truncation.
-  Changing/adding other string copy functions to detect truncation.

Fixes: c554941b ("Initial applications isolation support using Linux namespaces.")
Fixes: e2b53e16 ("Added "rootfs" feature.")
Closes: <https://github.com/nginx/unit/issues/795>
Cc: Andrei Zeliankou <zelenkov@nginx.com>
Cc: Zhidao HONG <z.hong@f5.com>
Cc: Andrew Clayton <a.clayton@nginx.com>
Signed-off-by: Alejandro Colomar <alx@nginx.com>

This patch fixes out-of-bounds reads and writes by placing some checks in the
right place.  However, this is only a workaround, and proper fixing requires:

-  Changing nxt_sprintf() to detect truncation.
-  Changing/adding other string copy functions to detect truncation.

Fixes: c554941 ("Initial applications isolation support using Linux namespaces.")
Fixes: e2b53e1 ("Added "rootfs" feature.")
Closes: <#795>
Cc: Andrei Zeliankou <zelenkov@nginx.com>
Cc: Zhidao HONG <z.hong@f5.com>
Cc: Andrew Clayton <a.clayton@nginx.com>
Signed-off-by: Alejandro Colomar <alx@nginx.com>
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.

Undefined Behavior: write past the end of an array
1 participant