Re: Run-time taint support proposal
| From: | Ilia Alshanetsky | Date: | Fri, 15 Dec 2006 22:56:06 +0000 |
| Subject: | Re: Run-time taint support proposal | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-26987@lists.php.net to get a copy of this message | ||
On 15-Dec-06, at 5:19 PM, Wietse Venema wrote:
Ilia Alshanetsky:By all means :-) I suppose by making taint_flag 1 bit, you are assuming taint is purely black and white and that all untaint functions will secure data against all forms of usage. Ilia AlshanetskyThere is no need for that.- Each ZVAL is marked tainted or not tainted (i.e. we don't taint individual characters within substrings). Black and white is all. In some future, someone may want to explore the possibility of more than two shades. But not now.That means an additional element to a struct that has thousands of instances in most scripts, this will be the first overhead caused by the memory footprint increase.zvalue_value value; /* value */ zend_uint refcount; zend_uchar type; /* active type */ ! zend_uchar is_ref;}; --- 289,296 ----zvalue_value value; /* value */ zend_uint refcount; zend_uchar type; /* active type */ ! zend_uchar is_ref:7; ! zend_uchar taint_flag:1;}; Perhaps a working implementation will be convincing. I offer to do the work, other people lose nothing except the possibility that they will be proven right.