[Home]

Summary:ASTERISK-04821: [patch] Format string error in cli.c
Reporter:knielsen (knielsen)Labels:
Date Opened:2005-08-12 06:26:45Date Closed:2011-06-07 14:10:05
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) ast_cli_fix.1.patch
Description:There is a classic "format string vulnerability" error in cli.c handle_help().
Ie. don't use ast_cli(fd, input), use ast_cli(fd, "%s", input).

It causes segfault if a command usage string contains '%'.

Attached 1-line patch implements the necessary fix.

****** ADDITIONAL INFORMATION ******

Disclaimer is on file.
Comments:By: Olle Johansson (oej) 2005-08-12 06:43:52

Does the same error exist in stable?

Thanks for fixing this.

By: knielsen (knielsen) 2005-08-12 07:34:56

Yes, the same error exists in stable (tag "v1.0.9").

By: Mark Spencer (markster) 2005-08-12 14:26:33

Fixed in CVS head, thanks!

By: Russell Bryant (russell) 2005-08-26 12:07:35

fixed in 1.0

I also found another one in cvs head while I was at it :)

By: Digium Subversion (svnbot) 2008-01-15 15:44:19.000-0600

Repository: asterisk
Revision: 6324

U   trunk/cli.c

------------------------------------------------------------------------
r6324 | markster | 2008-01-15 15:44:18 -0600 (Tue, 15 Jan 2008) | 2 lines

Fix CLI formatting typo (bug ASTERISK-4821)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=6324

By: Digium Subversion (svnbot) 2008-01-15 15:45:37.000-0600

Repository: asterisk
Revision: 6414

U   branches/v1-0/cli.c

------------------------------------------------------------------------
r6414 | russell | 2008-01-15 15:45:36 -0600 (Tue, 15 Jan 2008) | 2 lines

fix format string (issue ASTERISK-4821)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=6414

By: Digium Subversion (svnbot) 2008-01-15 15:45:38.000-0600

Repository: asterisk
Revision: 6415

U   trunk/cli.c

------------------------------------------------------------------------
r6415 | russell | 2008-01-15 15:45:37 -0600 (Tue, 15 Jan 2008) | 2 lines

fix format string (inspired by issue ASTERISK-4821)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=6415