Skip to content

Conversation

@SajanGhimire1
Copy link

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.

SajanGhimire1 and others added 2 commits January 9, 2026 08:05
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.
@jahnvi480
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jahnvi480
Copy link
Contributor

@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.

@jahnvi480
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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