Skip to content

Fix security and stability issues from code review#17

Merged
Critlist merged 2 commits into
masterfrom
fix/code-review-2026-06-05
Jun 6, 2026
Merged

Fix security and stability issues from code review#17
Critlist merged 2 commits into
masterfrom
fix/code-review-2026-06-05

Conversation

@Critlist

@Critlist Critlist commented Jun 6, 2026

Copy link
Copy Markdown
Owner
  • Format string vulns: pline(xprname()) in invent.c, pline(buf) in options.c
  • UB: free() on arena-allocated topten entry in end.c
  • Null deref: getenv("HOME") in pager.c child(); add setuid(getuid()) drop before exec
  • OOB read: ep[-1] when ep==NULL in dowhatis()
  • Save system: sr_u16 removed (was panic-backed, now replaced with safe read() in check_save_header); fd leaks on three dorecover() early-return paths; save_pos typed off_t not long; lseek failure branched separately from "too old" path
  • Signal safety: resize_pending changed to volatile sig_atomic_t

Critlist added 2 commits June 5, 2026 20:48
- Format string vulns: pline(xprname()) in invent.c, pline(buf) in options.c
- UB: free() on arena-allocated topten entry in end.c
- Null deref: getenv("HOME") in pager.c child(); add setuid(getuid()) drop before exec
- OOB read: ep[-1] when ep==NULL in dowhatis()
- Save system: sr_u16 removed (was panic-backed, now replaced with safe read() in
  check_save_header); fd leaks on three dorecover() early-return paths; save_pos
  typed off_t not long; lseek failure branched separately from "too old" path
- Signal safety: resize_pending changed to volatile sig_atomic_t
@Critlist Critlist merged commit 0bd798b into master Jun 6, 2026
7 checks passed
@Critlist Critlist deleted the fix/code-review-2026-06-05 branch June 6, 2026 02:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant