Skip to content

ffi: validate fast pointer BigInt argument ranges - #65032

Open
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:ffi-bigint-range-bypass
Open

ffi: validate fast pointer BigInt argument ranges#65032
trivikr wants to merge 1 commit into
nodejs:mainfrom
trivikr:ffi-bigint-range-bypass

Conversation

@trivikr

Copy link
Copy Markdown
Member

Fixes: #65031

Optimized V8 fast API calls truncate out-of-range pointer BigInts. Validate them against uintptrMax before invoking the raw function so optimized calls match the generic and shared-buffer paths.


Assisted-by: codex:gpt-5.6-sol

Optimized V8 fast API calls truncate out-of-range pointer BigInts.
Validate them against uintptrMax before invoking the raw function
so optimized calls match the generic and shared-buffer paths.
Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: codex:gpt-5.6-sol
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/ffi

@nodejs-github-botnodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. ffi Issues and PRs related to experimental Foreign Function Interface support. needs-ci PRs that need a full CI run. labels Aug 5, 2026
@trivikrtrivikr added the request-ci Add this label to start a Jenkins CI on a PR. label Aug 5, 2026
@familyman8583-cryptofamilyman8583-crypto mentioned this pull request Aug 5, 2026
1 task
@codecov

codecovBot commented Aug 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.30%. Comparing base (c8fa0b1) to head (7f83e09).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@ Coverage Diff @@## main #65032 +/- ##
==========================================
- Coverage 92.04% 90.30% -1.74% 
==========================================
Files 399 759 +360 Lines 175810 247645 +71835 Branches 27119 46693 +19574 ==========================================
+ Hits 161816 223630 +61814 - Misses 13682 15467 +1785 - Partials 312 8548 +8236 
Files with missing linesCoverage Δ
lib/internal/ffi/fast-api.js94.13% <100.00%> (+68.58%)⬆️
src/node_ffi.cc70.71% <ø> (ø)

... and 488 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++Issues and PRs that require attention from people who are familiar with C++.ffiIssues and PRs related to experimental Foreign Function Interface support.needs-ciPRs that need a full CI run.request-ciAdd this label to start a Jenkins CI on a PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ffi: optimized fast pointer BigInts bypass range validation

2 participants

@trivikr@nodejs-github-bot