Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix paths read from compiler_commands.json #98

Merged
merged 1 commit into from
Mar 10, 2025

Conversation

fgyanz
Copy link
Collaborator

@fgyanz fgyanz commented Mar 10, 2025

Any path read from the compile_commands.json must be absolute, and if not converted to one. However, to make it absolute, only the first '..' should be replaced by the desired directory path. Any subsequent '..' must be ignored.

Bug triggered with CVE:

klp-build setup -n bsc1231196  --cve 2024-46815 --module amdgpu --conf
CONFIG_DRM_AMDGPU --file-func
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c rn_notify_wm_ranges
--arch x86_64

klp-build extract -n bsc1231196 --apply-patches --filter '15.6rtu2'

@fgyanz fgyanz added the bug Something isn't working label Mar 10, 2025
@fgyanz fgyanz self-assigned this Mar 10, 2025
@fgyanz fgyanz requested review from marcosps and vmezzela and removed request for marcosps March 10, 2025 14:24
Any path read from the `compile_commands.json` must be absolute,
and if not converted to one. However, to make it absolute, only the
first '..' should be replaced by the desired directory path. Any
subsequent '..' must be ignored.

Signed-off-by: Fernando Gonzalez <[email protected]>
Copy link
Collaborator

@marcosps marcosps left a comment

Choose a reason for hiding this comment

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

Thanks a lot for fixing it!

Copy link
Collaborator

@vmezzela vmezzela left a comment

Choose a reason for hiding this comment

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

lgtm, thanks @fgyanz !

@vmezzela vmezzela merged commit f97b1a0 into SUSE:devel Mar 10, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants