Skip to content

Fix use-of-uninitialized-value in start_fake_frame #11732

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

Conversation

iluuu1994
Copy link
Member

No description provided.

@iluuu1994 iluuu1994 force-pushed the fix-uouv-in-start_fake_frame branch from 9f245b8 to 74b014b Compare July 19, 2023 16:04
Copy link
Member

@arnaud-lb arnaud-lb left a comment

Choose a reason for hiding this comment

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

Looks good to me. We may as well initialize it to EG(current_execute_data) (all code paths do it after that).

BTW, was it detected by MSAN? While looking at #9933, I've noticed that since zend_vm_stack_push_call_frame reuses frames, uninitialized VM stack memory may not appear as uninitialized to MSAN. I don't know if we could change that by using __msan_allocated_memory().

@iluuu1994
Copy link
Member Author

@arnaud-lb Yes, found via MSAN with Clang 16. Allocating call frames with malloc while using MSAN or even ASAN for bounds checking sounds like a good idea!

@iluuu1994 iluuu1994 closed this in ed27d70 Aug 3, 2023
jorgsowa pushed a commit to jorgsowa/php-src that referenced this pull request Aug 16, 2023
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.

2 participants