Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!news.snarked.org!news.linkpendium.com!news.linkpendium.com!news.iecc.com!.POSTED!nerds-end From: Seima Rao Newsgroups: comp.compilers Subject: Self-modifying code, Function pointers & { Safety, Security} Date: Fri, 7 Mar 2014 21:34:15 +0530 Organization: Compilers Central Lines: 23 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <14-03-015@comp.compilers> NNTP-Posting-Host: news.iecc.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: miucha.iecc.com 1394383125 80087 64.57.183.58 (9 Mar 2014 16:38:45 GMT) X-Complaints-To: abuse@iecc.com NNTP-Posting-Date: Sun, 9 Mar 2014 16:38:45 +0000 (UTC) Keywords: question, comment Posted-Date: 09 Mar 2014 12:38:45 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:1137 Hi, We are used to separation of code from data at the language level. However, two features disupt security : i) self-modifying code i.e. writing to code space ii) functions residing in data space Are there safety & security solutions possible for the above two safety, security holes ? Sincerely, Seima Rao. [The major reasons for self-modifying code historically were for address modification for indexing and subroutine returns. Index registers and indirect addressing provide instruction modification as the instruction is executed, making those modifications go away. For runtime code generation, there have been a variety of approaches to controlled addition of code to running programs, which I could dig up if people care. -John]