Skip to content

add overflow checks for IPC handle size#1579

Merged
lukaszstolarczuk merged 2 commits into
oneapi-src:mainfrom
bratpiorka:rrudnick_fix_IPC
Jun 15, 2026
Merged

add overflow checks for IPC handle size#1579
lukaszstolarczuk merged 2 commits into
oneapi-src:mainfrom
bratpiorka:rrudnick_fix_IPC

Conversation

@bratpiorka

Copy link
Copy Markdown
Contributor

add overflow checks for IPC handle size with tests

@bratpiorka bratpiorka requested a review from a team as a code owner June 11, 2026 10:43

@lukaszstolarczuk lukaszstolarczuk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm

if: ${{matrix.shared_library == 'ON' && matrix.compiler.cxx == 'cl'}}
run: ${{github.workspace}}/.github/scripts/check_dll_flags.ps1 ${{env.BUILD_RELEASE_DIR}}/bin/Release/umf.dll
run: |
if (Test-Path "${{env.BUILD_RELEASE_DIR}}/bin/Release/umf.dll") {
run: ${{github.workspace}}/.github/scripts/check_dll_flags.ps1 ${{env.BUILD_RELEASE_DIR}}/bin/Release/umf.dll
run: |
if (Test-Path "${{env.BUILD_RELEASE_DIR}}/bin/Release/umf.dll") {
$dll_path = "${{env.BUILD_RELEASE_DIR}}/bin/Release/umf.dll"
if (Test-Path "${{env.BUILD_RELEASE_DIR}}/bin/Release/umf.dll") {
$dll_path = "${{env.BUILD_RELEASE_DIR}}/bin/Release/umf.dll"
} else {
$dll_path = "${{env.BUILD_RELEASE_DIR}}/bin/umf.dll"
Comment thread .github/workflows/reusable_basic.yml Fixed
Comment thread .github/workflows/reusable_basic.yml Fixed
Comment thread .github/workflows/reusable_basic.yml Fixed
- name: check /DEPENDENTLOADFLAG in umf.dll
run: ${{github.workspace}}/.github/scripts/check_dll_flags.ps1 ${{env.BUILD_DIR}}/bin/${{matrix.build_type}}/umf.dll
run: |
if (Test-Path "${{env.BUILD_DIR}}/bin/${{matrix.build_type}}/umf.dll") {
run: ${{github.workspace}}/.github/scripts/check_dll_flags.ps1 ${{env.BUILD_DIR}}/bin/${{matrix.build_type}}/umf.dll
run: |
if (Test-Path "${{env.BUILD_DIR}}/bin/${{matrix.build_type}}/umf.dll") {
$dll_path = "${{env.BUILD_DIR}}/bin/${{matrix.build_type}}/umf.dll"
if (Test-Path "${{env.BUILD_DIR}}/bin/${{matrix.build_type}}/umf.dll") {
$dll_path = "${{env.BUILD_DIR}}/bin/${{matrix.build_type}}/umf.dll"
} else {
$dll_path = "${{env.BUILD_DIR}}/bin/umf.dll"
@bratpiorka bratpiorka requested a review from PatKamin June 11, 2026 13:28
if: ${{matrix.shared_library == 'ON' && matrix.compiler.cxx == 'cl'}}
run: ${{github.workspace}}/.github/scripts/check_dll_flags.ps1 ${{env.BUILD_RELEASE_DIR}}/src/proxy_lib/Release/umf_proxy.dll
run: |
if (Test-Path "${{env.BUILD_RELEASE_DIR}}/src/proxy_lib/Release/umf_proxy.dll") {
run: ${{github.workspace}}/.github/scripts/check_dll_flags.ps1 ${{env.BUILD_RELEASE_DIR}}/src/proxy_lib/Release/umf_proxy.dll
run: |
if (Test-Path "${{env.BUILD_RELEASE_DIR}}/src/proxy_lib/Release/umf_proxy.dll") {
$dll_path = "${{env.BUILD_RELEASE_DIR}}/src/proxy_lib/Release/umf_proxy.dll"
Comment thread test/ipcAPI.cpp Outdated
}

umf_result_t ext_get_ipc_handle_size(size_t *size) noexcept {
*size = std::numeric_limits<size_t>::max();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Lower value of std::numeric_limits<size_t>::max() - sizeof(ipc_cache_value_t) + 1 should satisfy the tests. Please, check that

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

if: ${{matrix.shared_library == 'ON' && matrix.compiler.cxx == 'cl'}}
run: ${{github.workspace}}/.github/scripts/check_dll_flags.ps1 ${{env.BUILD_RELEASE_DIR}}/src/proxy_lib/Release/umf_proxy.dll
run: |
Get-ChildItem -Path "${{env.BUILD_RELEASE_DIR}}" -Recurse
if (Test-Path "${{env.BUILD_RELEASE_DIR}}/src/proxy_lib/Release/umf_proxy.dll") {
$dll_path = "${{env.BUILD_RELEASE_DIR}}/src/proxy_lib/Release/umf_proxy.dll"
} else {
$dll_path = "${{env.BUILD_RELEASE_DIR}}/src/proxy_lib/umf_proxy.dll"
@bratpiorka bratpiorka force-pushed the rrudnick_fix_IPC branch 4 times, most recently from a696d86 to 41e722f Compare June 12, 2026 12:36
@bratpiorka bratpiorka requested a review from PatKamin June 12, 2026 12:57
@lukaszstolarczuk

Copy link
Copy Markdown
Collaborator

zizmor fixes TBD

@lukaszstolarczuk lukaszstolarczuk merged commit 2ec69c0 into oneapi-src:main Jun 15, 2026
75 checks passed
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.

4 participants