{"action":"created","issue":{"url":"https://api.github.com/repos/ImageMagick/ImageMagick/issues/1118","repository_url":"https://api.github.com/repos/ImageMagick/ImageMagick","labels_url":"https://api.github.com/repos/ImageMagick/ImageMagick/issues/1118/labels{/name}","comments_url":"https://api.github.com/repos/ImageMagick/ImageMagick/issues/1118/comments","events_url":"https://api.github.com/repos/ImageMagick/ImageMagick/issues/1118/events","html_url":"https://github.com/ImageMagick/ImageMagick/issues/1118","id":319345422,"number":1118,"title":"formatIPTCfromBuffer memory leak","user":{"login":"schumilo","id":8689842,"avatar_url":"https://avatars3.githubusercontent.com/u/8689842?v=4","gravatar_id":"","url":"https://api.github.com/users/schumilo","html_url":"https://github.com/schumilo","followers_url":"https://api.github.com/users/schumilo/followers","following_url":"https://api.github.com/users/schumilo/following{/other_user}","gists_url":"https://api.github.com/users/schumilo/gists{/gist_id}","starred_url":"https://api.github.com/users/schumilo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schumilo/subscriptions","organizations_url":"https://api.github.com/users/schumilo/orgs","repos_url":"https://api.github.com/users/schumilo/repos","events_url":"https://api.github.com/users/schumilo/events{/privacy}","received_events_url":"https://api.github.com/users/schumilo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-01T22:09:49Z","updated_at":"2018-05-01T23:25:31Z","closed_at":null,"author_association":"NONE","body":"### Prerequisites\r\n\r\n- [x] I have written a descriptive issue title\r\n- [x] I have verified that I am using the latest version of ImageMagick\r\n- [x] I have searched [open](https://github.com/ImageMagick/ImageMagick/issues) and [closed](https://github.com/ImageMagick/ImageMagick/issues?q=is%3Aissue+is%3Aclosed) issues to ensure it has not already been reported\r\n\r\n### Description\r\nMemory leak in formatIPTCfromBuffer. \r\nASAN Report: \r\n\r\n```\r\n=================================================================\r\n==14089==ERROR: LeakSanitizer: detected memory leaks\r\n\r\nDirect leak of 14249 byte(s) in 1 object(s) allocated from:\r\n    #0 0x4b9228 in __interceptor_malloc (/home/sergej/ImageMagick/.libs/lt-magick+0x4b9228)\r\n    #1 0x7fb99ce84cdd in formatIPTCfromBuffer /home/sergej/ImageMagick/coders/meta.c:2081\r\n    #2 0x7fb99ce84cdd in format8BIM /home/sergej/ImageMagick/coders/meta.c:2242\r\n\r\nSUMMARY: AddressSanitizer: 14249 byte(s) leaked in 1 allocation(s).\r\n```\r\nFound with a modified version of the kAFL fuzzer (https://github.com/RUB-SysSec/kAFL).\r\n\r\nCredits: Sergej Schumilo, Cornelius Aschermann (Ruhr-Universität Bochum)\r\n\r\n### Steps to Reproduce\r\n<!-- List of steps, sample code, failing test or link to a project that reproduces the behavior.\r\n     Make sure you place a stack trace inside a code (```) block to avoid linking unrelated issues -->\r\n[memleak_2.zip](https://github.com/ImageMagick/ImageMagick/files/1965325/memleak_2.zip)\r\n\r\n```\r\n# Using an ASAN build of ImageMagick\r\nASAN_OPTIONS=allow_addr2line=true ./magick_asan memleak_2 /dev/null \r\n```\r\n\r\n### System Configuration\r\n<!-- Tell us about the environment where you are experiencing the bug -->\r\n\r\n- ImageMagick version: ImageMagick 7.0.7-29 Q16 x86_64 2018-04-30\r\n- Environment (Operating system, version and so on): Ubuntu 16.04.4 LTS\r\n- Additional information: \r\n\r\n<!-- Thanks for reporting the issue to ImageMagick! -->\r\n"},"comment":{"url":"https://api.github.com/repos/ImageMagick/ImageMagick/issues/comments/385819572","html_url":"https://github.com/ImageMagick/ImageMagick/issues/1118#issuecomment-385819572","issue_url":"https://api.github.com/repos/ImageMagick/ImageMagick/issues/1118","id":385819572,"user":{"login":"urban-warrior","id":12486802,"avatar_url":"https://avatars0.githubusercontent.com/u/12486802?v=4","gravatar_id":"","url":"https://api.github.com/users/urban-warrior","html_url":"https://github.com/urban-warrior","followers_url":"https://api.github.com/users/urban-warrior/followers","following_url":"https://api.github.com/users/urban-warrior/following{/other_user}","gists_url":"https://api.github.com/users/urban-warrior/gists{/gist_id}","starred_url":"https://api.github.com/users/urban-warrior/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urban-warrior/subscriptions","organizations_url":"https://api.github.com/users/urban-warrior/orgs","repos_url":"https://api.github.com/users/urban-warrior/repos","events_url":"https://api.github.com/users/urban-warrior/events{/privacy}","received_events_url":"https://api.github.com/users/urban-warrior/received_events","type":"User","site_admin":false},"created_at":"2018-05-01T23:25:31Z","updated_at":"2018-05-01T23:25:31Z","author_association":"CONTRIBUTOR","body":"Thanks for the problem report.  We can reproduce it and will have a patch to fix it in GIT master branch @ https://github.com/ImageMagick/ImageMagick later today.  The patch will be available in the beta releases of ImageMagick @ https://www.imagemagick.org/download/beta/ by sometime tomorrow. \r\n"}}
{"actor":{"display_login":"urban-warrior"}}