llnl / llnl/fpzip

Bounds Checking on fpzip buffer Functions

Open
#5 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
125
Forks
17
PR merge metrics
No merged PRs in 30d

Description

Hi Dr. Lindstrom,

I was working on integrating a WASM fpzip decoder into a web viewer (Neuroglancer). However, the maintainer felt it would be best if fpzip performed bounds checking on arrays for the functions. It can cause buffer overflow issues if the number of bytes is not provided.

- `fpzip_read_from_buffer(const void* buffer, const size_t num_bytes)`
- `fpzip_read(FPZ* fpz, void* data, const size_t num_bytes)`

There may be others, but those are the big ones. It seems like this would be backwards incompatible without adding new functions, so perhaps `fpzip_read_from_buffer2` and `fpzip_read2` would be better?

Thanks so much for your work. Let me know if you need any updates to https://github.com/seung-lab/fpzip . I could potentially help a PR for this as well.

Will

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 declarations and implementations of fpzip_read_from_buffer and fpzip_read, then inspect nearby buffer-reading entry points for similar size handling. Determine the intended behavior when num_bytes is absent or insufficient, including whether new APIs are needed. Done means the affected functions cannot read beyond the supplied buffer and their behavior is covered by the project’s available checks.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, wasm
Domain
api, 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.