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

CodeQL DB missing half the source C files, getting compiled with no errors. #19066

Open
rjt-gupta opened this issue Mar 19, 2025 · 6 comments
Open
Labels
question Further information is requested

Comments

@rjt-gupta
Copy link

Description of the issue

I am building codeQL DB of an ARM based Windows kernel driver. The driver and the codeQL DB is getting built successfully, but the src.zip folder is missing many source files (.c). I see that those missing files are getting compiled and there are .obj files being created for them. Somehow CodeQL is not able to see them.

To give more context:
This driver folder is a collection of multiple drivers inside. So, we have a master build script in the source-root that compiles all the drivers, but I dont think that should be the issue? If the .obj files are getting created that means CodeQL should be able to see those. Also, it is not missing all C files, the src.zip has some of them.

How should I debug further?

@rjt-gupta rjt-gupta added the question Further information is requested label Mar 19, 2025
@rvermeulen
Copy link
Contributor

Hi @rjt-gupta,

Thanks for your question. I believe our support on Windows is limited to X86-64 https://codeql.github.com/docs/codeql-overview/system-requirements/. Let me double check with the team.

@rvermeulen
Copy link
Contributor

Hi @rjt-gupta,

Quick follow up. Are you cross-compiling or running CodeQL on Windows ARM?

@rjt-gupta
Copy link
Author

Hello @rvermeulen!

Thanks for your response. Actually, I am building the ARM driver codebase on x86_64 Windows. So, not really running anything on ARM.

@jketema
Copy link
Contributor

jketema commented Mar 20, 2025

Hi @rjt-gupta,

Thanks for confirming that your cross-compiling.

So, we have a master build script in the source-root that compiles all the drivers, but I dont think that should be the issue?

Correct, that should work.

If the .obj files are getting created that means CodeQL should be able to see those.

Did you do a clean build? If there were any object files remaining from a previous build, the build system might have skipped building some source files, and them CodeQL would not pick up on them.

@rjt-gupta
Copy link
Author

Hi @jketema!

Yes, I tried building with multiple different clean builds. Actually, I'm facing this issue only with this particular driver, there are other similar ARM based drivers for which Im able to build the codeQL DBs correctly. I think there is something different in the build process for this particular driver that CodeQL is not able to catch.

Is there a private channel that I can share logs to? I guess that would be faster.

@jketema
Copy link
Contributor

jketema commented Mar 20, 2025

Is there a private channel that I can share logs to? I guess that would be faster.

The GitHub security lab slack is your best option in that case: https://gh.io/securitylabslack

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants