Ticket #1963 (closed bug: fixed)

Opened 16 months ago

Last modified 16 months ago

execvp() Tries to Execute Directories

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

Description (last modified by bonefish) (diff)

r24582, 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

Changed 16 months ago by bonefish

  • owner changed from axeld to bonefish
  • status changed from new to assigned
  • component changed from File Systems/BFS to System/libroot.so
  • description modified (diff)
  • summary changed from BFS Finds Spurious File to execvp() 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.

Changed 16 months ago by bonefish

  • status changed from assigned to closed
  • resolution set to fixed

Fixed in r24599.

Note: See TracTickets for help on using tickets.