Skip to content
This repository has been archived by the owner on Oct 3, 2021. It is now read-only.

ldv-linux-3.0/module_get_put-drivers-gpu-drm-i915-i915.ko.cil.out: allocate memory #1274

Merged
merged 1 commit into from
Dec 18, 2020

Conversation

tautschnig
Copy link
Contributor

The pointer var_group3 is eventually passed to kfree, and thus needs
to point to heap-allocated memory to avoid memory safety issues. See
also #1270.

…locate memory

The pointer var_group3 is eventually passed to `kfree`, and thus needs
to point to heap-allocated memory to avoid memory safety issues. See
also sosy-lab#1270.
@sim642
Copy link
Contributor

sim642 commented Dec 18, 2020

This fixes the case where main calls intel_hdmi_destroy which ends up freeing var_group3 as `connector, but that doesn't seem the only issue here.

When instead main calls intel_hdmi_get_modes, it ends up dereferencing uninitialized pointers in the malloced struct, e.g. (struct drm_i915_private *)(connector->dev)->dev_private.

Copy link
Contributor

@zvonimir zvonimir left a comment

Choose a reason for hiding this comment

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

LGTM

@dbeyer dbeyer merged commit d00b71c into sosy-lab:master Dec 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C Task in language C issue with benchmark
Development

Successfully merging this pull request may close these issues.

6 participants