Skip to content

Fix open_basedir leak #11780

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

Closed
wants to merge 1 commit into from
Closed

Fix open_basedir leak #11780

wants to merge 1 commit into from

Conversation

iluuu1994
Copy link
Member

Fixes oss-fuzz #60741

Fixes oss-fuzz #60741
@@ -80,6 +80,7 @@ struct _php_core_globals {
char *user_dir;
char *include_path;
char *open_basedir;
bool open_basedir_modified;
Copy link
Member

Choose a reason for hiding this comment

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

I know @nielsdos did some struct packing at one time, but there was also one case where it wasn't super worth it to do it compared to keeping the relevant bits nearby. Might have been the globals struct

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah. I prefer keeping related globals together, as it's easier to understand but also potentially improves cache locality. I'm not going to die on a hill for this though.

Copy link
Member

Choose a reason for hiding this comment

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

I indeed did a bit of struct packing here too. When I did it I made sure that fields that were in the same cacheline were still in the same line after reordering. However, packing is not important here, this is fine as-is imo.

@iluuu1994 iluuu1994 closed this in 127ad70 Jul 25, 2023
jorgsowa pushed a commit to jorgsowa/php-src that referenced this pull request Jul 26, 2023
Fixes oss-fuzz #60741
Closes phpGH-11780
jorgsowa pushed a commit to jorgsowa/php-src that referenced this pull request Aug 16, 2023
Fixes oss-fuzz #60741
Closes phpGH-11780
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants