Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7789655
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T21:21:45+00:00 2026-06-01T21:21:45+00:00

If the ASLR play a role in IOS and randomize the start address of

  • 0

If the ASLR play a role in IOS and randomize the start address of heap , then how to get the start address of the current process and other process’s heap from pid?

In aslr.c supplied with the paper:”iOS kernel Exploitation”, seems that you try to get the start address of the current process’s heap code blew.

void* heap = malloc(0);

I test the code, find that the return value are not all the same.
According ISO/IEC 9899:TC2 (i.e. the C99 standard), §7.20.3 states:

If the size of the space requested is zero, the behavior is implementation-defined:
either a null pointer is returned, or the behavior is as if the size were some nonzero value, except that the returned pointer shall not be used to access an object.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T21:21:47+00:00Added an answer on June 1, 2026 at 9:21 pm

    If the ASLR play a role in IOS and randomize the start address of heap,

    It does.

    then how to get the start address of the current process and other process’s heap from pid?

    You can’t (at least not easily — I can’t think of any method, short of attaching GDB and examining glibc-internal variable __curbrk).

    I test the code, find that the return value are not all the same

    Why did you expect them to be the same?

    In a single executable, with ASLR disabled, malloc(0) inside main will return the same value. If you enable ASLR, you’ll get different values. If you build different executables, you’ll get different values.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

From a Microsoft article : Address Space Layout Randomization (ASLR) ASLR moves executable images
According to ASLR(Address Space Layout Randomization), It provides random stack and heap allocations and
I would like to disable address space layout randomization (ASLR) on my system (Ubuntu
ASLR and DEP are two techniques that are used to protect applications from hackers.
From http://blogs.msdn.com/b/michael_howard/archive/2007/04/04/codegear-s-new-delphi-2007-supports-aslr-and-nx.aspx , I am using {$SETPEOPTFLAGS $140} in my project file right under
Why is it that when running code from gdb, I get the same addresses
Delphi 2007 (and newer) supports enabling DEP and ASLR via any of these three
How do you disable ASLR on Windows 7 x64 so that my program will
I am looking at various buffer/heap/stack protection technologies such as PAX, DEP, NX, CANARIES,
I just read about how ASLR helps in preventing buffer overflow attacks and would

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.