[Bug 14756] New: busybox segfaults when argv[0]==NULL

bugzilla at busybox.net bugzilla at busybox.net
Sun Apr 17 17:48:23 UTC 2022


https://bugs.busybox.net/show_bug.cgi?id=14756

            Bug ID: 14756
           Summary: busybox segfaults when argv[0]==NULL
           Product: Busybox
           Version: unspecified
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Other
          Assignee: unassigned at busybox.net
          Reporter: logoerthiner1 at 163.com
                CC: busybox-cvs at busybox.net
  Target Milestone: ---

This is a fairly old bug (feature?)

```
python3 -c "import
ctypes;print(ctypes.CDLL('libc.so.6').execve(b'/sbin/busybox',0,0))"
```

This makes busybox segfault. busybox could have a better way to deal with it,
for example assume the applet is "" or "busybox" or get the path from
`/proc/self/exe`, depending on the case. Even if rejecting argv[0]=NULL is a
feature,  `exit(1)` should be better than segfault, as segfault is effectively
a ub.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the busybox-cvs mailing list