Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2005-10-22
10:31 • Closed ticket [1017523fff]: lset-based DOS plus 3 other changes artifact: d6ca7be506 user: msofer
2004-08-27
19:10 • Ticket [1017523fff]: 4 changes artifact: 0168b71f3e user: dkf
11:28 • New ticket [1017523fff]. artifact: 3ff7dda976 user: msofer

lset-based DOS

Closed / Wont Fix1017523fffffffffffffffffffffffffffffffffCreated 22 years agoUpdated 21 years ago
Descriptionplain2004-08-27 11:28:07
The script
   set a [list abc]
   while 1 {lset a 0 $a}
consumes all available memory.
dkfplain2004-08-27 19:10:33
Logged In: YES 
user_id=79902

This is just a memory consumption DoS attack.  Tcl is
vulnerable to these and I know of no way (within the context
of Tcl) to prevent them.  In a wider context, process
accounting limits (ulimit -m, ulimit -v or ulimit -d) are
the easiest way to put a lid on this sort of thing.

Ideally, the [interp limit] infrastructure would catch this,
but it's a lot of work to make it happen because memory is
not currently allocated within the context of an interpreter
so determining who it belongs to is non-trivial.
msofer Closed ticket [1017523fff]. [History diff]2005-10-22 10:31:19
Log in (anonymous is fine) to add a comment.