nmap / nmap/npcap

Y2038 problem in Npcap?

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

Nobody has claimed this yet.

Dominant language
C
Stars
3.6k
Forks
592
PR merge metrics
No merged PRs in 30d

Description

Npcap passes packets with a struct bpf_hdr header. The bh_timestamp member is a struct timeval which uses long as the type for tv_usec. This is the same as struct timeval that Windows defines in winsock2.h, and libpcap specifically states that this struct timeval is system-dependent. Packets captured after 19 January 2038 will appear to be captured in 1970. Fixing this issue will require coordination with the-tcpdump-group/libpcap.

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 examining Npcap's struct bpf_hdr and its bh_timestamp struct timeval, then review the linked libpcap definition and its system-dependent timeval note. Coordinate with the-tcpdump-group/libpcap on a compatible representation, and verify that packets captured after 19 January 2038 no longer appear to have 1970 timestamps.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
networking
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.