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

Crash when length($uac_req(callid)) > 128 #3135

Closed
hance2010 opened this issue Jun 7, 2022 · 1 comment
Closed

Crash when length($uac_req(callid)) > 128 #3135

hance2010 opened this issue Jun 7, 2022 · 1 comment

Comments

@hance2010
Copy link

Description

Crash when length($uac_req(callid)) > 128

Troubleshooting

Reproduction

function send_options()
	local KAM_DOMAIN = "192.168.100.131"
	-- length(callid)  is 129
	local callid = "0123456789-0123456789-0123456789-0123456789-0123456789-0123456789-0123456789-0123456789-0123456789-0123456789-0123456789-0000000" 
	local tu = "sip:1001@" .. KAM_DOMAIN
	local sut = "sip:192.168.100.132:5080"

	KSR.pv.sets("$uac_req(method)", "OPTIONS")		
	KSR.pv.sets("$uac_req(callid)", callid)
	KSR.pv.sets("$uac_req(furi)", "sip:" .. "kamailio" .. "@" .. KAM_DOMAIN)
	KSR.pv.sets("$uac_req(ruri)", tu)
	KSR.pv.sets("$uac_req(turi)", tu)
	KSR.pv.sets("$uac_req(ouri)", sut)
	KSR.pv.seti("$uac_req(evroute)", 1)
	KSR.uac.uac_req_send()
end

Debugging Data

Log Messages

(paste your log messages here)

SIP Traffic

(paste your sip traffic here)

Possible Solutions

https://github.com/kamailio/kamailio/blob/5.5/src/modules/uac/uac_send.c#L425

check len

Additional Information

  • Kamailio Version - output of kamailio -v
Kamailio5.5.4
  • Operating System:
Debian11
miconda added a commit that referenced this issue Jun 7, 2022
miconda added a commit that referenced this issue Jun 7, 2022
- GH #3135

(cherry picked from commit 0eeb4cc)
(cherry picked from commit 69b4b62)
miconda added a commit that referenced this issue Jun 7, 2022
- GH #3135

(cherry picked from commit 0eeb4cc)
(cherry picked from commit 69b4b62)
(cherry picked from commit 4694656)
@miconda
Copy link
Member

miconda commented Jun 7, 2022

Thanks for report and troubleshooting info! Commits have been pushed to master and stable branches.

@miconda miconda closed this as completed Jun 7, 2022
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