.
D 2026-06-21T19:05:03.193
J assignee nobody
J closer nobody
J cmimetype text/x-markdown
J comment Had\san\sAI\sreport\s[this\sPR](https://github.com/tcltk/tcl/pull/41)\son\sGithub.\sPatch\sis\stotally\sunusable,\sbut\sprinciple\sis\ssomething\swe\sshould\saudit\sfor.\r\n\r\n##\sDescription\s(from\sPR)\r\n\r\n>\sThe\sZlibTransformInput\sfunction\sprocesses\scompressed\sdata\sfrom\sa\schannel\swithout\senforcing\slimits\son\stotal\sdecompressed\soutput\ssize.\sA\ssmall\scompressed\spayload\s(zip\sbomb)\scan\sexpand\sto\sgigabytes\sof\sdata,\sexhausting\ssystem\smemory.\sThe\sfunction\scontinues\sto\sinflate\sdata\sas\slong\sas\sthe\scaller\srequests\smore\sbytes,\swith\sno\sbuilt-in\sprotection\sagainst\sexcessive\sexpansion\sratios.\r\n\r\n>\sExploitation\sscenario:\sAn\sattacker\ssends\sa\scrafted\scompressed\spayload\s(e.g.,\sa\s1KB\sgzip\sstream\sthat\sdecompresses\sto\s1GB)\sthrough\sa\sTcl\schannel\sconfigured\swith\szlib\sdecompression\s(e.g.,\svia\s'zlib\spush\sdecompress\s$chan').\r\n\r\n##\sProposed\sFix\s(from\sPR)\r\n\r\nAt\sline\s3313,\sadd\sthis\s(in\s`ZlibTransformInput`,\sshortly\safter\scall\sto\s`ResultDecompress`):\r\n\r\n>\s```\r\n>\s\t/*\r\n>\s\t\s*\sGuard\sagainst\sdecompression\sbombs:\sif\stotal\sdecompressed\soutput\r\n>\s\t\s*\sexceeds\s1\sGiB,\sreturn\san\serror\sto\sprevent\smemory\sexhaustion.\r\n>\s\t\s*/\r\n>\s\tif\s(chanDataPtr->inStream.total_out\s>\s(1024UL*1024UL*1024UL))\s{\r\n>\s\t\s\s\s\s*errorCodePtr\s=\sEFBIG;\r\n>\s\t\s\s\s\sreturn\s-1;\r\n>\s\t}\r\n>\s```
J foundin 8.6
J is_private 0
J login dkf
J priority 5\sMedium
J private_contact f6b536f9c1ed4b589e96e38fb613afc3d8991783
J resolution None
J severity Severe
J status Open
J submitter dkf
J subsystem 57.\szlib
J title Possible\szlib\scompression\sbomb\svulnerabilities
J type Bug
K 9563b8eeeca59ca891df8406c80ae71ae6a73b57
U dkf
Z e75261b7dfe4fc951b51987e369c28ef