Use correct kernel headers version

Open
#25 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
20/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Stale
Tech stack
centos, linux, shell

Research direction

No files or tests are named. Start by locating the arm64 and x86 toolchain configuration and the kernel-header selection, then verify the chosen headers against CentOS 6.10's 2.6.32 baseline. Done means both toolchains use the oldest supported kernel headers and the required compatibility handling is validated.

Written by the indexing model from the issue text.

Description

bug

The arm64 and x86 toolchain should use the same kernel headers version as found on the oldest distro version we want to support. Not newer, not older.

Currently the x86 toolchain targets CentOS 6.10, glibc 2.12.2, which has a kernel version 2.6.32, but we use kernel headers for 4.7.

This causes problems when configuring the third party libraries for the target system, because they can detect features that aren't actually present.
At the same time the kernel data structures used might not be in sync with what the actual underlying kernel is using (think of audit, netlink, perf etc), which could result in errors, access to invalid memory, crashes.

What we should do instead is to have the toolchain use the correct headers and then have osquery create it's own copy of defines or data structures where necessary, and switch between them depending on the version of kernel it's running on.

Dominant language
Shell
Stars
43
Forks
23
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from osquery/osquery-toolchain

All issues in osquery/osquery-toolchain

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.