mozilla-services / mozilla-services/autograph

nit: enforce JAR header length and max headers

Open
#147 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

code quality enhancement
Dominant language
Go
Stars
176
Forks
34
Avg merge
1d 17h
Merged PRs (30d)
3

Description

Per the spec:

Implementations should support 65535-byte (not character) header values, and 65535 headers per file. They might run out of memory, but there should not be hard-coded limits below these values.

https://docs.oracle.com/javase/8/docs/technotes/guides/jar/jar.html#Notes_on_Manifest_and_Signature_Files

We're probably doing something wrong if our APKs are that big, but it's a potential DoS vector (memory usage).

Switching to APK v2 or v3 sigs would also address the problem, since I don't believe they require unpacking and reading the whole APK.

Also, check whether Fx XPIs expect that and line length to be enforced (per https://github.com/mozilla-services/autograph/pull/145#issuecomment-425114934).

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

No files or tests are named. Trace the JAR/APK header parsing entry points, compare the behavior with the linked Java JAR specification, and review the XPI expectations noted in Autograph pull request #145. Done means supporting 65535-byte header values and 65535 headers per file without lower hard-coded limits, while checking the related line-length requirement.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
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.