Description:
I performed fuzz testing using the provided fuzz.go file and a downloaded corpus, which resulted in a crash. Specifically, the program hangs and does not exit normally. Below are the detailed steps and reproduction information.
4. **Write Go Code to Reproduce the Hang**:
```go
package main
import (
"log"
"github.com/gomarkdown/markdown"
)
func main() {
// Request string variable
str := "~~~~\xb4~\x94~\x94~\xd1\r\r:\xb4\x94\x94~\x9f~\xb4~\x94~\x94\x94"
// Convert string to byte slice
data := []byte(str)
log.Println("Starting markdown parsing with manual input...")
markdown.Parse(data, nil)
log.Println("Parsing completed successfully.")
}
Run the Go Code and Observe the Hang:
root@8d09d0785da6:~/markdown/Test1# go run manual_fuzz.go
2024/07/29 06:50:21 Starting markdown parsing with manual input...
^Csignal: interrupt
Issue Details: After manually adding the corpus and running manual_fuzz.go, a hang was successfully obtained. The crash information indicates it occurs in the ast.GetLastChild function. The program hangs and does not exit normally, requiring manual interruption.
Steps to Reproduce:
Clone and download the corpus.
Run the corpus using go-fuzz and capture the crash.
Write a manual feed function and attempt to reproduce the crash.
Observe the program hang.
Environment:
System: Docker fuzzers/go-fuzz:1.2.0
Tools: go-fuzz, gomarkdown/markdown
Expected Solution: I am not proficient in Golang and do not know how to fix this issue. I hope the data I provided will be helpful for the project.
Description: I performed fuzz testing using the provided
fuzz.go
file and a downloaded corpus, which resulted in a crash. Specifically, the program hangs and does not exit normally. Below are the detailed steps and reproduction information.Steps to Reproduce:
Clone the Corpus:
Run the Fuzzer:
View the Crash Stack Information:
1 fp=0xc0004a9fe8 sp=0xc0004a9fe0 pc=0x4547e1
Issue Details: After manually adding the corpus and running
manual_fuzz.go
, a hang was successfully obtained. The crash information indicates it occurs in theast.GetLastChild
function. The program hangs and does not exit normally, requiring manual interruption.Steps to Reproduce:
go-fuzz
and capture the crash.Environment:
go-fuzz
,gomarkdown/markdown
Expected Solution: I am not proficient in Golang and do not know how to fix this issue. I hope the data I provided will be helpful for the project.