-
Notifications
You must be signed in to change notification settings - Fork 385
fix(localization): critical memory safety bugs in encoding conversion #1555
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
base: dev
Are you sure you want to change the base?
Conversation
CRITICAL FIXES: 1. Fixed NULL pointer dereference in SystemLocale::NextChar() - Added NULL check to prevent crash when start pointer is NULL - Prevents DoS attack via malformed encoding input 2. Fixed uninitialized pointer return in IConvCachePool::Borrow() - Explicitly set pCache to NULL after failed allocation - Prevents undefined behavior and potential memory corruption - Eliminates use-after-free/information disclosure risk These memory safety vulnerabilities affect the SQL Server PHP driver when handling user-provided data with specific encoding conditions.
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@SajanGhimire1 Thanks for raising the PR for this fix, Can you please check why is the pipeline failing for all OSs and fix it, also I would like you to add some tests to check if the code that you have added really works. |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Added a NULL pointer check in NextChar to prevent crashes.
@jahnvi480 I’ve added the NULL pointer check in NextChar() and explicitly set pCache = NULL in IConvCachePool::Borrow(). These changes fix the memory safety issues and don’t alter any other logic. |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@SajanGhimire1 MacOs and Linux tests are failing can you check on this |
iam working on this. |
CRITICAL FIXES:
Fixed NULL pointer dereference in SystemLocale::NextChar()
Fixed uninitialized pointer return in IConvCachePool::Borrow()
These memory safety vulnerabilities affect the SQL Server PHP driver when handling user-provided data with specific encoding conditions.