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

Format security error in dbeacon.cpp #1

Open
irl opened this issue Jun 20, 2016 · 1 comment
Open

Format security error in dbeacon.cpp #1

irl opened this issue Jun 20, 2016 · 1 comment
Assignees
Labels

Comments

@irl
Copy link

irl commented Jun 20, 2016

dbeacon.cpp: In function 'void d_logv(int, const char*, __va_list_tag*)':
dbeacon.cpp:250:23: error: format not a string literal and no format arguments [-Werror=format-security]
   syslog(level, buffer);

Need to fix this to satisfy Debian hardening requirements.

@irl irl added the bug label Jun 20, 2016
@irl irl self-assigned this Jun 20, 2016
@irl
Copy link
Author

irl commented Jun 20, 2016

This is fixed in the Debian package (0.4.0-1):

Description: Fixes a format security error in a syslog call in dbeacon.cpp
Author: Iain R. Learmonth <irl@debian.org>
Bug: https://github.com/uoaerg/dbeacon/issues/1
Last-Update: 2016-06-20
---

--- a/dbeacon.cpp
+++ b/dbeacon.cpp
@@ -247,7 +247,7 @@
    vsnprintf(buffer, sizeof(buffer), format, vl);

    if (use_syslog && past_init) {
-       syslog(level, buffer);
+       syslog(level, "%s", buffer);
    } else {
        char tbuf[64];
        timeval tv;

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

No branches or pull requests

1 participant