{"action":"closed","issue":{"url":"https://api.github.com/repos/collectd/collectd/issues/2723","repository_url":"https://api.github.com/repos/collectd/collectd","labels_url":"https://api.github.com/repos/collectd/collectd/issues/2723/labels{/name}","comments_url":"https://api.github.com/repos/collectd/collectd/issues/2723/comments","events_url":"https://api.github.com/repos/collectd/collectd/issues/2723/events","html_url":"https://github.com/collectd/collectd/issues/2723","id":307672129,"number":2723,"title":"uuid plugin can erroneously write past the end of a heap block and corrupt heap metadata","user":{"login":"kwiatrox","id":24602937,"avatar_url":"https://avatars2.githubusercontent.com/u/24602937?v=4","gravatar_id":"","url":"https://api.github.com/users/kwiatrox","html_url":"https://github.com/kwiatrox","followers_url":"https://api.github.com/users/kwiatrox/followers","following_url":"https://api.github.com/users/kwiatrox/following{/other_user}","gists_url":"https://api.github.com/users/kwiatrox/gists{/gist_id}","starred_url":"https://api.github.com/users/kwiatrox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kwiatrox/subscriptions","organizations_url":"https://api.github.com/users/kwiatrox/orgs","repos_url":"https://api.github.com/users/kwiatrox/repos","events_url":"https://api.github.com/users/kwiatrox/events{/privacy}","received_events_url":"https://api.github.com/users/kwiatrox/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-22T14:40:16Z","updated_at":"2018-03-30T13:42:56Z","closed_at":"2018-03-30T13:42:56Z","author_association":"CONTRIBUTOR","body":"*   Version of collectd: 5.8\r\n*   Operating system / distribution: redhat\r\n\r\n## Expected behavior\r\n\r\nCollectd up & running.\r\n\r\n## Actual behavior\r\n\r\nCrash during init. The error can happen in different places, always on malloc of free. Below is an example of backtrace:\r\n\r\n```\r\n*** Error in `/opt/collectd/sbin/collectd': corrupted double-linked list: 0x00000000026447d0 ***\r\n======= Backtrace: =========\r\n/lib64/libc.so.6(+0x7ab54)[0x7fe11db9fb54]\r\n/lib64/libc.so.6(+0x7de72)[0x7fe11dba2e72]\r\n/lib64/libc.so.6(__libc_malloc+0x4c)[0x7fe11dba510c]\r\n/lib64/libc.so.6(open_memstream+0x1a)[0x7fe11db98ada]\r\n/lib64/libc.so.6(__vsyslog_chk+0x7a)[0x7fe11dc1702a]\r\n/lib64/libc.so.6(syslog+0x8f)[0x7fe11dc1758f]\r\n/opt/collectd/sbin/collectd(plugin_log+0xe9)[0x40b609]\r\n/opt/collectd/lib/collectd/intel_pmu.so(+0x2424)[0x7fe11a201424]\r\n/opt/collectd/sbin/collectd(plugin_init_all+0x157)[0x40ea07]\r\n/opt/collectd/sbin/collectd(main+0x1c8)[0x406088]\r\n/lib64/libc.so.6(__libc_start_main+0xf5)[0x7fe11db46c05]\r\n/opt/collectd/sbin/collectd[0x4066a4]\r\n```\r\n\r\n## Steps to reproduce\r\n\r\n*  To reproduce enable a lot of plugins like cpu, load, intel_pmu, intel_rdt, ipmi, turbostat, logfile, syslog, csv and uuid. The set of plugins and configuration can be different depending on system but with uuid disabled it always works.\r\n\r\nI traced the issue to init of uuid plugin.\r\nIt writes to `hostname_g` directly:\r\n\r\n```sstrncpy(hostname_g, uuid, DATA_MAX_NAME_LEN);```\r\n\r\nI guess it should use `hostname_set(char const *hostname)` instead. Size of `hostname_g` can be smaller than `uuid`."}}
{"actor":{"display_login":"rubenk"}}