开发者

Is ARM a more secure instruction set?

I have read that 'Normal' ARM instructions are fixed length - 32 bits. And that no 开发者_高级运维ARM instruction can jump into the middle of another instruction - something that is easy to do with x86 instructions.

(For x86, Google's NaCl tries to 'fix' this by aligning instructions on 32 byte boundaries.)

Does this make ARM programs more secure or more resistant to certain attacks?

If so, does this extend to Thumb and Java instructions?


The place where it can be safer is when scanning opcode to sandbox process. If you want to prohibit or intercept some instruction, doing so is easier on a fixed length instruction set. On x86 architecture, the instruction set depends of the context, and instruction have variable length, so an instruction that seems harmless can in fact embed another instruction, if you parse it from the correct offset. You can effectively "jump in the middle of an instruction" and still have a valid instruction.

ARM is easier to parse, and thumb mode does not change this. So ARM instruction set is not particularly safer per se, but is far easier to parse, and correct parsing is necessary for the NaCl like sandboxing

This is the short and probably inexact answer. For a more definitive answer, look at this blog post on the excellent matasano blog


You're thinking about that attack of clobbering the stack return address or similar so it branches into a payload right? Word alignment isn't a big help or hindrance there I imagine - you just need to align the payload 4 bytes. Oh, and x64 requires 16-byte instruction alignment.

Is this what you meant?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜