home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / RSCOPE2.ZIP / README.1ST < prev   
Text File  |  1989-01-15  |  2KB  |  38 lines

  1.           ----------------------------------------------------
  2.           * * * A NOTE OF CAUTION CONCERNING PHYSMEM.SYS * * *
  3.           ----------------------------------------------------
  4.  
  5. The device driver PHYSMEM.SYS provided with this package is, in one sense,
  6. a "gateway" by which the normal memory protection mechanisms used by OS/2
  7. can be bypassed. The selectors provided by version 1.11 of PHYSMEM correspond
  8. to descriptors in the calling program's LDT marked as "readable" and
  9. "executable" but not "writable". The access types for the selectors created
  10. with the PhysToUVirt call (see PHYSMEM.ASM) must be one of two possible
  11. combinations: read/write or read/execute. This is determined by the value
  12. passed to PhysToUVirt in the DH register (0=r/w, 1=r/e). Read/execute is
  13. the one used here, since it is the safer of the two (RamScope does not write
  14. to the segment thus obtained).
  15.  
  16. There is no method provided for verifying the identity of the program which
  17. calls the PHYSMEM device driver; it could be called by any program which
  18. "knows" of its existence. With the current version, a "badly behaved" program
  19. could not write anywhere in memory, but it would be possible for it to perform
  20. a far call or jump to anywhere, thus precipitating a probable system crash.
  21.  
  22. It is of course possible to modify PHYSMEM.ASM and re-assemble it to produce
  23. a version which returns selectors to read/write segments. A driver thus
  24. created would, as before, be accessible to all programs in the system,
  25. giving "badly behaved" programs a means to trash anything in memory,
  26. including modifying other programs' code segments, system descriptor tables,
  27. etc.
  28.  
  29. This is not to say that PHYSMEM will cause problems, since it is rather
  30. unlikely that any programs will "accidentally" open a device by this name
  31. and then make the specific IOCtl calls required to use it. However, a
  32. deliberately malicious program, OR a legitimate one under development which
  33. uses PHYSMEM, could wreak havoc.
  34.  
  35. All this is nothing new, since any program running in real mode in the DOS
  36. compatibility box could do this also, but it is best that users of PHYSMEM
  37. be aware of this different type of "loophole" in the memory protection.
  38.