{"action":"created","issue":{"url":"https://api.github.com/repos/ethereum/go-ethereum/issues/1352","labels_url":"https://api.github.com/repos/ethereum/go-ethereum/issues/1352/labels{/name}","comments_url":"https://api.github.com/repos/ethereum/go-ethereum/issues/1352/comments","events_url":"https://api.github.com/repos/ethereum/go-ethereum/issues/1352/events","html_url":"https://github.com/ethereum/go-ethereum/issues/1352","id":91769085,"number":1352,"title":"SEC-52 block header timestamp int64 overflow","user":{"login":"Gustav-Simonsson","id":293096,"avatar_url":"https://avatars.githubusercontent.com/u/293096?v=3","gravatar_id":"","url":"https://api.github.com/users/Gustav-Simonsson","html_url":"https://github.com/Gustav-Simonsson","followers_url":"https://api.github.com/users/Gustav-Simonsson/followers","following_url":"https://api.github.com/users/Gustav-Simonsson/following{/other_user}","gists_url":"https://api.github.com/users/Gustav-Simonsson/gists{/gist_id}","starred_url":"https://api.github.com/users/Gustav-Simonsson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gustav-Simonsson/subscriptions","organizations_url":"https://api.github.com/users/Gustav-Simonsson/orgs","repos_url":"https://api.github.com/users/Gustav-Simonsson/repos","events_url":"https://api.github.com/users/Gustav-Simonsson/events{/privacy}","received_events_url":"https://api.github.com/users/Gustav-Simonsson/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ethereum/go-ethereum/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/ethereum/go-ethereum/labels/in%20progress","name":"in progress","color":"eb6420"},{"url":"https://api.github.com/repos/ethereum/go-ethereum/labels/vuln","name":"vuln","color":"e11d21"}],"state":"open","locked":false,"assignee":{"login":"Gustav-Simonsson","id":293096,"avatar_url":"https://avatars.githubusercontent.com/u/293096?v=3","gravatar_id":"","url":"https://api.github.com/users/Gustav-Simonsson","html_url":"https://github.com/Gustav-Simonsson","followers_url":"https://api.github.com/users/Gustav-Simonsson/followers","following_url":"https://api.github.com/users/Gustav-Simonsson/following{/other_user}","gists_url":"https://api.github.com/users/Gustav-Simonsson/gists{/gist_id}","starred_url":"https://api.github.com/users/Gustav-Simonsson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gustav-Simonsson/subscriptions","organizations_url":"https://api.github.com/users/Gustav-Simonsson/orgs","repos_url":"https://api.github.com/users/Gustav-Simonsson/repos","events_url":"https://api.github.com/users/Gustav-Simonsson/events{/privacy}","received_events_url":"https://api.github.com/users/Gustav-Simonsson/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2015-06-29T10:39:26Z","updated_at":"2015-06-29T13:48:20Z","closed_at":null,"body":"We convert the received block header timestamp to a int64 here: https://github.com/ethereum/go-ethereum/blob/develop/core/block_processor.go#L356\r\n\r\nA malicious miner can set a timestamp value that will overflow a int64 into a value that is valid according to consensus rules. This breaks consensus as two different block headers (hashes) would be considered the same by the Go consensus validations.\r\n\r\nConverting to a uint type here is enough to avoid this as block times will always be positive integers in UNIX time.\r\n\r\nTODO: verify what scalar value size will be accepted here in terms of RLP - we could potentially have a overflow on any uint too."},"comment":{"url":"https://api.github.com/repos/ethereum/go-ethereum/issues/comments/116665584","html_url":"https://github.com/ethereum/go-ethereum/issues/1352#issuecomment-116665584","issue_url":"https://api.github.com/repos/ethereum/go-ethereum/issues/1352","id":116665584,"user":{"login":"Gustav-Simonsson","id":293096,"avatar_url":"https://avatars.githubusercontent.com/u/293096?v=3","gravatar_id":"","url":"https://api.github.com/users/Gustav-Simonsson","html_url":"https://github.com/Gustav-Simonsson","followers_url":"https://api.github.com/users/Gustav-Simonsson/followers","following_url":"https://api.github.com/users/Gustav-Simonsson/following{/other_user}","gists_url":"https://api.github.com/users/Gustav-Simonsson/gists{/gist_id}","starred_url":"https://api.github.com/users/Gustav-Simonsson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gustav-Simonsson/subscriptions","organizations_url":"https://api.github.com/users/Gustav-Simonsson/orgs","repos_url":"https://api.github.com/users/Gustav-Simonsson/repos","events_url":"https://api.github.com/users/Gustav-Simonsson/events{/privacy}","received_events_url":"https://api.github.com/users/Gustav-Simonsson/received_events","type":"User","site_admin":false},"created_at":"2015-06-29T13:48:20Z","updated_at":"2015-06-29T13:48:20Z","body":"https://github.com/ethereum/go-ethereum/pull/1355"}}