buffer-overflow Questions

9

Solved

I am on CentOS 6.4 32 bit and am trying to cause a buffer overflow in a program. Within GDB it works. Here is the output: [root@localhost bufferoverflow]# gdb stack GNU gdb (GDB) Red Hat Enterpris...

3

i, and a few thousand other people, are getting an error being thrown by the Microsoft Visual C++ Runtime: Which for the benefit of search engines, says: Microsoft Visual C++ Runtime Library ...
Bunsen asked 18/11, 2009 at 1:17

7

Solved

void function(int a, int b, int c) { char buffer1[5]; char buffer2[10]; int *ret; ret = buffer1 + 12; (*ret) += 8;//why is it 8?? } void main() { int x; x = 0; function(1,2,3); x = 1; ...
Gog asked 30/3, 2010 at 8:23

7

I use this code: while ( scanf("%s", buf) == 1 ){ What would be the best way to prevent possible buffer overflow so that it can be passed strings of random lengths? I know I can limit th...
Stringed asked 25/10, 2009 at 16:56

11

Solved

Edit: I've added the source for the example. I came across this example: char source[MAX] = "123456789"; char source1[MAX] = "123456789"; char destination[MAX] = "abcdefg"; char destination1[MAX]...
Pga asked 11/8, 2009 at 5:17

10

Solved

What is the difference between a stack overflow and a buffer overflow in programming?
Elissa asked 13/7, 2009 at 16:30

2

Solved

I encountered this question while writing a program that requires the sprintf function. In some cases, using the sprintf function can lead to memory overflow and pose a security risk. So, you can u...
Vivl asked 16/4, 2023 at 18:35

3

I am at the very beginning of learning C. I am trying to write a function to open a file, read a BUFFER_SIZE, store the content in an array, then track the character '\n' (because I want to get ea...
Cherrylchersonese asked 29/7, 2018 at 10:12

13

Solved

When I try to compile C code that uses the gets() function with GCC, I get this warning: (.text+0x34): warning: the `gets' function is dangerous and should not be used. I remember this has so...
Telford asked 7/11, 2009 at 18:55

3

Solved

I know languages like c# aren't vulnerable to buffer overflows unless you marshal or use unsafe code. But is go vulnerable for buffer overflows?
Pavlish asked 26/10, 2016 at 12:58

6

Solved

I have a buffer, I am doing lot of strncat. I want to make sure I never overflow the buffer size. char buff[64]; strcpy(buff, "String 1"); strncat(buff, "String 2", sizeof(buff)); strncat(buff,...
Gratian asked 1/8, 2011 at 20:22

2

Android application crashing often, Following are the logs from logcat. com.google.android.apps.gsa.shared.speech.a.g: Error reading from input stream at com.google.android.apps.gsa.staticplu...
Caseinogen asked 2/6, 2017 at 2:17

0

Short Story I am writing a simple program in Assembly to simulate buffer overflow. The buffer is simply memory allocation from 512 bytes stack and then read() syscall is called with 4096 bytes from...
Spruik asked 1/6, 2021 at 16:37

3

Solved

I'm currently reading (for the second time) "Hacking : The Art of Exploitation" and have stumbled on something. The book suggests two different ways to exploit these two similar programs : auth_ov...
Experiment asked 11/8, 2016 at 8:29

5

I want to exploit a stack based buffer overflow for education purposes. There is a typical function called with a parameter from main, which is given as input from the program a local buffer where...
Hemorrhage asked 5/1, 2012 at 11:11

3

What set of GCC options provide the best protection against memory corruption vulnerabilities such as Buffer Overflows, and Dangling Pointers? Does GCC provide any type of ROP chain mitigation? Are...
Dumond asked 24/11, 2012 at 19:0

2

Solved

I'm practicing some buffer-overflow techniques and I came across an odd issue with sending socked data. I have this two almost identical codes, except the fact that in Python3 code, I changed the ...
Snoop asked 8/4, 2015 at 11:45

1

I made a c vulnerable C code and tried to exploit it but it doesn't seem to work even though I copied other examples. I apologize if I included lot of code. #include <stdio.h> #include <s...
Chromaticity asked 5/4, 2020 at 16:57

1

I am completing a homework assignment (I can't post the code because of this), and I get this runtime error very infrequently: * stack smashing detected *: terminated Aborted (core dumped) When I...
Deedradeeds asked 9/4, 2020 at 6:45

1

Solved

I was solving a question on Leetcode (Trapping rain water) and I wrote my solution which had been tested on my local machine as well as on GeeksForGeeks where it passed all TC's. the code is:...
Seppuku asked 1/4, 2020 at 18:2

1

Solved

I wanted to know how the following error message should be read. In particular: (1) what do things such as fa (heap left redzone) and fd (freed heap region) mean? (2) What is the significance o...
Dacosta asked 21/10, 2019 at 14:33

4

I apologize in advance for the useless title of this question, but nothing seemed to fit better. The idea here is to replicate argv in another variable, essentially making a copy of it. So the bas...
Josh asked 9/5, 2019 at 10:5

3

Solved

I've written a piece of C code and I've disassembled it as well as read the registers to understand how the program works in assembly. int test(char *this){ char sum_buf[6]; strncpy(sum_buf,this...
Oram asked 26/4, 2012 at 0:30

1

Solved

I started studying software security, and I'm having trouble getting what buffer overflow attack and ROP attack are. From what I understand is, Buffer overflow attack: When a buffer has a cer...
Normally asked 8/6, 2019 at 18:4

12

Solved

I have heard about a buffer overflow and I would like to know how to cause one. Can someone show me a small buffer overflow example? New(And what they are used for?)
Formwork asked 22/2, 2009 at 2:5

© 2022 - 2025 — McMap. All rights reserved.