Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

converted pointer straddles multiple allocations #5

Open
Desmoss900 opened this issue Oct 24, 2023 · 7 comments
Open

converted pointer straddles multiple allocations #5

Desmoss900 opened this issue Oct 24, 2023 · 7 comments
Assignees

Comments

@Desmoss900
Copy link

Desmoss900 commented Oct 24, 2023

Hi,

when compiling with -d=checkptr to detect incorrect unsafe pointer allocations the lib fails with:

goroutine 1 [running]: runtime.throw({0x724b17?, 0x0?}) /usr/local/go/src/runtime/panic.go:1047 +0x5d fp=0xc000159b88 sp=0xc000159b58 pc=0x43297d runtime.checkptrAlignment(0x7fd279f593c8?, 0xc000159bf8?, 0x1?) /usr/local/go/src/runtime/checkptr.go:26 +0x6c fp=0xc000159ba8 sp=0xc000159b88 pc=0x40642c sctp.FromSCTPGetAddrs(0xc000010558) sctp_addr.go:153 +0x15b fp=0xc000159c10 sp=0xc000159ba8 pc=0x680a9b sctp.(*SCTPListener).Addr(0xc0000223b8) sctp_listener.go:34 +0xc7 fp=0xc000159c78 sp=0xc000159c10 pc=0x681ba7
This error appears when both IPv4 and IPv6 are activated.

added the -d=checkprt flag after example server failing multiple times after a few test connecitons...

when using IPv4 (sctp4) only the following is reported:

checkptr: pointer arithmetic result points to invalid allocation

goroutine 1 [running]: runtime.throw({0x725910?, 0x40640d?}) /usr/local/go/src/runtime/panic.go:1047 +0x5d fp=0xc000117b88 sp=0xc000117b58 pc=0x43297d runtime.checkptrArithmetic(0x7ff25e2f38a8?, {0xc000117c00, 0x1, 0x0?}) /usr/local/go/src/runtime/checkptr.go:69 +0xaa fp=0xc000117bb8 sp=0xc000117b88 pc=0x4065ca sctp.FromSCTPGetAddrs(0xc0000a8540) sctp_addr.go:160 +0xf4 fp=0xc000117c20 sp=0xc000117bb8 pc=0x680a34 sctp.(*SCTPListener).Addr(0xc0000b4388) sctp_listener.go:34 +0xc7 fp=0xc000117c88 sp=0xc000117c20 pc=0x681ba7

Any assistance would be appreciated.

@thebagchi thebagchi self-assigned this Oct 31, 2023
@thebagchi
Copy link
Owner

Investigating.
Any reference code will be helpful.

@Desmoss900
Copy link
Author

Desmoss900 commented Oct 31, 2023 via email

@Desmoss900
Copy link
Author

Desmoss900 commented Oct 31, 2023 via email

@thebagchi
Copy link
Owner

1d74d1a

@thebagchi
Copy link
Owner

if you bump up the payload size to 65536 bytes

Payload size greater 65535.
I think payload cannot be greater than MAX_UINT32 as SCTP is message oriented.

@Desmoss900
Copy link
Author

Desmoss900 commented Oct 31, 2023 via email

@thebagchi
Copy link
Owner

@Desmoss900 kindly check with tag 1.1.1
65535+ payload issue is not happening anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants