| Ticket UUID: | 3385749 | ||
| Title: | File open failures audited | ||
| Type: | Bug | Created on: | 2011-08-03 17:36:31 |
| Submitter: | sampsonr | Assigned to: | dgp |
| Subsystem: | 38. Init - Library - Autoload | Severity: | |
| Priority: | 5 Medium | Last modified: | 2011-08-08 00:35:19 |
| Status: | Open | Closed by: | |
| Resolution: | None | Closed on: | |
| Version: | None | ||
| Description: | ||||
At some points in the TCL C source, as well as in init.tcl, auto.tcl, and autoload.tcl, there are are file open(read) operations that do not check first to see if the file exists. Instead, they rely on a catch, or reacting to the open calls' return code. Granted, this is a fairly common programming practice, but it presents a hassle in environments where the system is subject to high-level auditing (e.g. government systems). In those cases, every single failed file open call results in an audit record being generated. On a system with hundreds of users, this contributes to a management burden for the S/A. I recommend that each such open attempt be wrapped with a [file exists] or a stat() call in the C. | ||||
| User Comments: | ||||
hobbs added on 2011-08-04 00:47:37:
The lack of 'file exists' (or readable) is actually intentional because some systems have ACLs that have duped 'file readable' in the past, saying not readable, but they were. dkf added on 2011-08-04 03:50:29:
There's also a race condition between an access()/stat() call and the open(). twylite added on 2011-08-08 00:35:19:
Are you referring to files that are used by Tcl itself, or to operations initiated by software written in Tcl? In the former case there may be an argument for doing a [file exists] (and accepting the race condition if it is not security sensitive). In the latter case an attempt was made to access the file, and if there is system-level auditing this fact _should_ be in the audit log. If this is happening a lot, the security administrators _should_ be investigating why there are so many attempts to open non-existent files. | ||||
