Skip to content

Harden allocators and mapper against Coverity safety paths - #1

Open
akanisetti wants to merge 1 commit into
edge-aosp-bsp:celadon/a15/masterfrom
akanisetti:cov-fixes
Open

Harden allocators and mapper against Coverity safety paths#1
akanisetti wants to merge 1 commit into
edge-aosp-bsp:celadon/a15/masterfrom
akanisetti:cov-fixes

Conversation

@akanisetti

@akanisetti akanisetti commented Jun 11, 2026

Copy link
Copy Markdown

Issue types:

  • Dereference null return value
  • Explicit null dereferenced
  • Overflowed constant
  • Unchecked return value
  • Use after free, Out-of-bounds access

Changes:

  • Added null checks for gralloc handles and array append allocations
  • Added input count validation in AIDL/HIDL allocator entry points
  • Hardened PlaneLayouts buffer handling and driver null checks
  • Replaced hidl_vec initializer-list construction with explicit resize/index assignment
  • Added return-value checks for drmIoctl GEM_CLOSE and lseek SEEK_SET
  • Guarded cross-domain metadata plane indexing against underflow
  • Cleared drv->priv across virtgpu backend init/cleanup to prevent UAF

Tracked-On: NIACP3-1398

@akanisetti
akanisetti requested a review from a team June 11, 2026 13:37
@akanisetti
akanisetti force-pushed the cov-fixes branch 3 times, most recently from a8a5ea1 to ae0b252 Compare June 11, 2026 15:31
Issue types:
- Dereference null return value
- Explicit null dereferenced
- Overflowed constant
- Unchecked return value
- Use after free, Out-of-bounds access

Changes:
- Added null checks for gralloc handles and array append allocations
- Added input count validation in AIDL/HIDL allocator entry points
- Hardened PlaneLayouts buffer handling and driver null checks
- Replaced hidl_vec initializer-list construction with explicit resize/index assignment
- Added return-value checks for drmIoctl GEM_CLOSE and lseek SEEK_SET
- Guarded cross-domain metadata plane indexing against underflow
- Cleared drv->priv across virtgpu backend init/cleanup to prevent UAF

Tracked-On: NIACP3-1398
Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
@akanisetti akanisetti changed the title Fix Coverity null-deref, overflow, checked-return, and UAF paths Harden allocators and mapper against Coverity safety paths Jun 11, 2026
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.

1 participant