openwrt / openwrt/procd

Undefined behaviour in signal_shutdown()

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

Nobody has claimed this yet.

Dominant language
C
Stars
11
Forks
40
PR merge metrics
No merged PRs in 30d

Description

There are possible scenarios in which printf("%s", NULL) could be invoked. (See https://github.com/openwrt/procd/blob/1e5c40e07928ab6de57ee1811945944ccb4f1907/signal.c#L36)

This is undefined behaviour which should be avoided.

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 in signal.c at signal_shutdown(), especially the printf("%s", NULL) path identified near line 36. Trace how the function can receive a NULL value and verify that shutdown handling no longer invokes printf with NULL while preserving the existing signal behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
operating-systems
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.