I kind of understand how stack frames work. Why do we use them to store the return address? It looks like that is why buffer overflows happen. Wouldn't it be more secure to allocate a certain memory region to just keep return addresses, fully separated from the stack?
Why do we use the stack for the return address of a function?
30 Views Asked by Mach At
1
There are 1 best solutions below
Related Questions in SECURITY
- HTTPS configuration in Spring Boot, server returning timeout
- HSM ZKA control mask values
- OWASP Amass Subcommands
- Is there a need for BPF Linux namespace?
- Error when trying to execute a binary compiled in a Kali Linux machine on an Ubuntu system
- When sanitize/encode while implementing tags system like on SO
- spring security version in spring-boot-starter-security
- I am currently trying to implement a rudimentary firewall from a video I watched but the nimda worm detection is not working and i do not know why?
- Is it possible for `sudo` to fail temporarily with the correct password? Hacking suspected
- Is it viable proxying all my mobile apps requests, to some kind knowing that a request is coming from a secure source
- What abilities should I concentrate on while bug hunting, and how can I improve the quality of my bug bounty reports?
- System.ArgumentOutOfRangeException: I passed this error in every single program
- How to prevent users from creating custom client apps?
- Does server-side content security policy exist for youtube video player API, app, mod apks and website?
- Can we pass a hostname/IP address as a query string in a GET request in REST API
Related Questions in STACK
- What is causing my towers of hanoi logic to infinitely loop?
- Asking code suggestions about data structure and algorithm
- Why is 'EDITBIN /STACK:2097152 w3wp.exe' cmd is giving me an LNK1342 error?
- issues with circular queues
- Missing PAGE_GUARD flag on the memory of stack for one windows application
- Purpose of stack register(s) in holding 0x7c00
- Split Dataframe and stack horizontally
- segmentation fault (core dumped) in C programming
- How to find Find max right using stack?
- Does an Stackoverflow occur in the JVM if the Activation Record is too small but there is still space left in the general stack?
- How to create 100 maps with bootstrapping using stacked ensemble fit with tidymodels
- How does the class Exchanger in Java actually work?
- How can I improve the iterative approach to be faster than recursive implementation, as usual?
- Need to make Stack cards on nav click as well ass page scroll with help of jquery
- Puncover: Stack column is empty after analysis
Related Questions in BUFFER-OVERFLOW
- Shell execution buffer overflow server directly hosted
- A buffer overflow only returning seg fault and not jumping to the address of a function
- Not seeing my input(NOPs) inside the stack
- Not getting the expected output when running a shell code in a buffer overflow
- Would this load the arguments and return value for a function?
- Encountered a heap-buffer-overflow while itterating with pointers
- Not getting the same result from running a python script to generate a certain input string as i get when typing it myself
- Buffer overflow attack not going as intended
- EIP doesn't get overwritten when perfoming a buffer overflow attack
- Splitting data in an ArraySegment<byte> to different Bytes[]
- UDP flow control with Gstreamer
- SegmentationFault of sprintf in CSAPP Attack Lab
- buffer overflow attack works when compiled using clang but not when compiled using gcc
- Buffer Overflow: Why does buffer assignment impact other variables?
- Buffer Overflow Discrepancy: Works on Linux VM but Fails on Windows Machine when Implementing Buffer Overflow Example
Related Questions in STACK-FRAME
- Stack frame and value pointer
- I can't use RSP to reference the end of the stack
- Is there a way to calculate the bytes allocated to the stack frame of a function?
- How to trace Stack Frame manually with just raw program memory record?
- How memory is allocated for a static array on the stack?
- tcl how to get command executed in which file and which line?
- Windows x64 stack frame ABI shenanigans
- In C, what happens to the stack when we have a return statement which returns a function call?
- Frame, Stack Frame in process Stacking Unstacking
- Does the System V ABI on Ubuntu place the return address within the caller function's frame or the callee function's frame?
- Get parameter value in Assembly
- How did alloca() interact with other stack allocation?
- Why do we use the stack for the return address of a function?
- C++ return by value class objects's memory whereabouts in wake of optimizations
- C# find what the last interacted with instance in the call stack is
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Actually, that is the way many Forth implementations work, they have a return stack as well as a data stack.
However, I know of no mainstream processors that do this same thing in hardware (except possibly the Forth-based ones from many moons ago).
They tend to have just the one stack that is used for both purposes.
In any case, stack-smashing is only one possible consequence of buffer overflows. It's not the storing of the return addresses that causes buffer overflows, it's the latter that corrupts the former. Even if you kept return addresses separate, buffer overflows would still corrupt data unrelated to return addresses.
Some would say that was even worse since, with stack smashing, you probably crash quickly because your function returns to some random memory location.
Protecting the return information would stop this from happening and then that corrupted data would be free to cause you more issues down the line somewhere :-)