Ticket #126 (closed defect: fixed)

Opened 9 months ago

Last modified 4 months ago

libmjollnir CFG error

Reported by: pepsi601 Owned by: thorkill
Priority: major Milestone: v0.82
Component: libmjollnir Version:
Severity: High Keywords:
Cc:

Description

there is an error in libmjollnir CFG module, in links.c mjr_link_block_jump function, the src block might be spited, this is not considered, so if the source and destination are in the same bloc, after the spit, the source block should be recalculated.

here is an example

suppose before the mjr_link_block_jump function, we have a basic block

1 2 3 4 and the parameter for mjr_link_block_jump is source is 4 , dst is 2 , ret is 5 so in the function, we first get the block associated with src, which starts at 1, after the spit we have two block 1 and 2 3 4 and the links added is [1] -> [2, 3, 4] [1] -> [5] which are wrong, we need to recalculate the source block, which is [2,3,4] and the right links should be [2, 3, 4] -> [2, 3,4] and [2,3,4] -> [5].

Attachments

miniweb (74.0 kB) - added by pepsi601 9 months ago.
a binay with debugging info that can reflect the bug

Change History

  Changed 9 months ago by pepsi601

  • owner set to thorkill
  • component changed from ERESI to libmjollnir
  • severity changed from Medium to High

follow-up: ↓ 4   Changed 9 months ago by thorkill

  • status changed from new to assigned

Thank for the bug report,

could you provide some binary example or objdump (preferred i386)?

Changed 9 months ago by pepsi601

a binay with debugging info that can reflect the bug

  Changed 9 months ago by pepsi601

I have attached a binary file from miniweb, please look at the block 0804D089 in main.

in reply to: ↑ 2 ; follow-up: ↓ 5   Changed 9 months ago by pepsi601

Replying to thorkill:

Thank for the bug report, could you provide some binary example or objdump (preferred i386)?

I have attached a binary file from miniweb, please look at the block 0804D089 in main.

in reply to: ↑ 4   Changed 9 months ago by thorkill

Replying to pepsi601:

I have attached a binary file from miniweb, please look at the block 0804D089 in main.

Yeah, I have seen it. Sorry for this delay - I'm a little busy with my job and university stuff. I will take care of this in next days.

  Changed 4 months ago by thorkill

  • status changed from assigned to closed
  • resolution set to fixed

It seems that it is working now - sorry for this delay - we are busy as usual.

Note: See TracTickets for help on using tickets.