Opened 16 years ago

Closed 16 years ago

#1963 closed bug (fixed)

execvp() Tries to Execute Directories

Reported by: bonefish Owned by: bonefish
Priority: critical Milestone: R1/alpha1
Component: System/libroot.so Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description (last modified by bonefish)

hrev24582, VMware

When execvp() finds a matching entry in the PATH, it doesn't make sure that it is a regular file. E.g. create a "cp" directory in the cwd and make it executable. execvp("cp",...) will try to execute it.

Change History (2)

comment:1 by bonefish, 16 years ago

Component: File Systems/BFSSystem/libroot.so
Description: modified (diff)
Owner: changed from axeld to bonefish
Status: newassigned
Summary: BFS Finds Spurious Fileexecvp() Tries to Execute Directories

Never write bug reports when too tired. There actually is an entry "cp", I just missed it; it's a directory. This is just another execvp() bug. I thought I was really clever replacing the stat() in the code copied from my APR code by access(), but we obviously also need to make sure that the entry is a regular file.

comment:2 by bonefish, 16 years ago

Resolution: fixed
Status: assignedclosed

Fixed in hrev24599.

Note: See TracTickets for help on using tickets.