rhboot / rhboot/shim

Authenticode needs to be computed against a padded and an unpadded binary.

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

Nobody has claimed this yet.

Dominant language
C
Stars
1.1k
Forks
348
PR merge metrics
No merged PRs in 30d

Description

Currently, if a binary enrolled by hash in MokList or MokListX (or db/dbx/etc), but it is not signed, and the Data Directory is not padded out to the correct alignment, a different Authenticode hash is produced than would be produced for a signed binary.

This seems like an easy fix, but it isn't, because padding it out ourselves would break existing entries - and thus in some cases un-ban an executable.

So we need to extend the authenticode implementation to compute two hashes for comparison in this case, and also compute both hashes on binaries that are correctly padded.

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start by locating the Authenticode implementation and the code paths comparing binaries against MokList, MokListX, db, and dbx entries. Trace how padding is handled for signed and unsigned binaries; done means both padded and unpadded hashes are computed and compared without invalidating existing entries.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.