{"action":"created","issue":{"url":"https://api.github.com/repos/systemd/systemd/issues/1911","labels_url":"https://api.github.com/repos/systemd/systemd/issues/1911/labels{/name}","comments_url":"https://api.github.com/repos/systemd/systemd/issues/1911/comments","events_url":"https://api.github.com/repos/systemd/systemd/issues/1911/events","html_url":"https://github.com/systemd/systemd/pull/1911","id":117069444,"number":1911,"title":"siphash24: handle unaligned input and output arguments","user":{"login":"martinpitt","id":200109,"avatar_url":"https://avatars.githubusercontent.com/u/200109?v=3","gravatar_id":"","url":"https://api.github.com/users/martinpitt","html_url":"https://github.com/martinpitt","followers_url":"https://api.github.com/users/martinpitt/followers","following_url":"https://api.github.com/users/martinpitt/following{/other_user}","gists_url":"https://api.github.com/users/martinpitt/gists{/gist_id}","starred_url":"https://api.github.com/users/martinpitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinpitt/subscriptions","organizations_url":"https://api.github.com/users/martinpitt/orgs","repos_url":"https://api.github.com/users/martinpitt/repos","events_url":"https://api.github.com/users/martinpitt/events{/privacy}","received_events_url":"https://api.github.com/users/martinpitt/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/systemd/systemd/labels/bug","name":"bug","color":"e11d21"},{"url":"https://api.github.com/repos/systemd/systemd/labels/release-critical","name":"release-critical","color":"e11d21"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":22,"created_at":"2015-11-16T07:40:40Z","updated_at":"2015-11-16T14:53:38Z","closed_at":"2015-11-16T14:53:38Z","pull_request":{"url":"https://api.github.com/repos/systemd/systemd/pulls/1911","html_url":"https://github.com/systemd/systemd/pull/1911","diff_url":"https://github.com/systemd/systemd/pull/1911.diff","patch_url":"https://github.com/systemd/systemd/pull/1911.patch"},"body":"The siphash24 implementation assumes the input can be cast to a 64-bit integer. This is not guaranteed to be true, when the input can be anything - including a pointer into a string, which is the case for some of systemd's uses, e. g. when calling this on the result of `basename()` in udev.\r\n\r\nWe only found this now as our ARM package build machines have \"2\" (fixup) in `/proc/cpu/alignment`; but our target devices have \"4\" (signal). With this, about a third of the tests fail with a `SIGBUS` error, but `test-siphash24` itself succeeds by chance as the pointers to the test arrays happen to be aligned.\r\n\r\nAdjusts test-siphash24.c to call siphash24_compress() for different alignments, so that the \"right\" test fails.\r\n\r\nFix siphash24_compress() to copy the buffer onto a properly aligned pointer if it is unaligned.\r\n\r\nThanks to Steve Langasek for the patch!"},"comment":{"url":"https://api.github.com/repos/systemd/systemd/issues/comments/157056993","html_url":"https://github.com/systemd/systemd/pull/1911#issuecomment-157056993","issue_url":"https://api.github.com/repos/systemd/systemd/issues/1911","id":157056993,"user":{"login":"martinpitt","id":200109,"avatar_url":"https://avatars.githubusercontent.com/u/200109?v=3","gravatar_id":"","url":"https://api.github.com/users/martinpitt","html_url":"https://github.com/martinpitt","followers_url":"https://api.github.com/users/martinpitt/followers","following_url":"https://api.github.com/users/martinpitt/following{/other_user}","gists_url":"https://api.github.com/users/martinpitt/gists{/gist_id}","starred_url":"https://api.github.com/users/martinpitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinpitt/subscriptions","organizations_url":"https://api.github.com/users/martinpitt/orgs","repos_url":"https://api.github.com/users/martinpitt/repos","events_url":"https://api.github.com/users/martinpitt/events{/privacy}","received_events_url":"https://api.github.com/users/martinpitt/received_events","type":"User","site_admin":false},"created_at":"2015-11-16T14:53:38Z","updated_at":"2015-11-16T14:53:38Z","body":"This was superseded by PR #1916 ."}}