Memory Corruption in QAB when calling other QAB programs - K4000029 - 26 Feb 2001

A Long standing bug in the QAB Interpreter has recently been discovered. The problem can arise when one QAB program calls another, specifying %send or %overlay, or returns from calling another specifying %receive or %overlay. In order to implement this processing the QAB Interpreter has to match variables between the two programs, and which it does by examining two lists. Unfortunately the code which tests for the end of the calling program's list is incorrect, causing memory to be spuriously referenced as though it contained information about QAB variables. It is possible, though relatively unusual, for this memory to appear to contain information about a variable that is shared between the programs. When this happens the called program will have a variable initialised to an incorrect value, and on return to the calling program a random area of its data area may also be corrupted (depending on whether the called program altered the value of the variable that was mistakenly initialised). In the latter case table lengths or type numbers may possibly be corrupted, which may cause various DP4 system errors. In theory this corruption could occur many times in a single program. However, in practice only a few items will be examined because the garbage items may well contain data that causes the searching for matching variables to be terminated anyway.

It is rather surprising that this problem has not been noticed before, which indicates that is probably fairly rare in practice. The problem is most likely to occur when calls to other programs are nested, and when a program in the middle has fewer variables than the programs above and below it in the hierarchy of program calls, and does not do very much work itself. In this case the memory that is incorrectly examined as though it were a variable list will most likely still contain most of the first programs variable list, so there is a much higher probability of variables being matched wrongly.

DP4 Products/Versions Affected

4.5xx,4.6xx

Where the version affected is given as 4.5xx or 4.6xx, all versions of DP4 issued prior to the date of the fix are potentially affected. Where a specific version number is given the problem was introduced by that release and prior releases are unaffected. If a patch release number is also specified (in parentheses) , the fault was introduced at that specific patch level.

Downloads

4.617 (3) progrun/progrund.exe (compatible with 4.616+)
4.617 (3) ntqab/ntqabd.lib (compatible with 4.616+)
4.521/4.522 Unix PROGRUN,PROGRUND (Open Server/ibcs)
4.521/4.522 Linux PROGRUN,PROGRUND
4.521/4.522 Unixware 7 PROGRUN,PROGRUND
4.522 Win16 progrun.exe,progrund.exe (4.520 compatible)
4.617 (3) Win16 progrun.exe,progrund.exe (4.616 compatible)

Due to limitations on available web space downloadable fixes are only available for the most commonly used environments, and may not be separately available in both 4.5xx and 4.6xx flavours. If a file you require is not available you can ask us to e-mail it to you.