{"action":"opened","issue":{"url":"https://api.github.com/repos/deadpixi/sam/issues/24","repository_url":"https://api.github.com/repos/deadpixi/sam","labels_url":"https://api.github.com/repos/deadpixi/sam/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/deadpixi/sam/issues/24/comments","events_url":"https://api.github.com/repos/deadpixi/sam/issues/24/events","html_url":"https://github.com/deadpixi/sam/issues/24","id":175272313,"number":24,"title":"Crash on start of samterm with hardening","user":{"login":"chneukirchen","id":139,"avatar_url":"https://avatars.githubusercontent.com/u/139?v=3","gravatar_id":"","url":"https://api.github.com/users/chneukirchen","html_url":"https://github.com/chneukirchen","followers_url":"https://api.github.com/users/chneukirchen/followers","following_url":"https://api.github.com/users/chneukirchen/following{/other_user}","gists_url":"https://api.github.com/users/chneukirchen/gists{/gist_id}","starred_url":"https://api.github.com/users/chneukirchen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chneukirchen/subscriptions","organizations_url":"https://api.github.com/users/chneukirchen/orgs","repos_url":"https://api.github.com/users/chneukirchen/repos","events_url":"https://api.github.com/users/chneukirchen/events{/privacy}","received_events_url":"https://api.github.com/users/chneukirchen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-06T15:08:26Z","updated_at":"2016-09-06T15:08:26Z","closed_at":null,"body":"I built sam/samterm with stack protector, PIE and fortify_source, and it segfaults at the Hbindname message now:\r\n\r\n```\r\n0x00005555555c1631 in inmesg (type=<optimized out>, count=<optimized out>)\r\n    at mesg.c:127\r\n127\t\t\ttext[i]->tag = m;\r\n(gdb) bt\r\n#0  0x00005555555c1631 in inmesg (type=<optimized out>, count=<optimized out>)\r\n    at mesg.c:127\r\n#1  0x00005555555c0c27 in rcv () at mesg.c:74\r\n#2  0x00005555555b12ea in main (argc=<optimized out>, argv=<optimized out>)\r\n    at main.c:83\r\n\r\n(gdb) p i\r\n$3 = 0\r\n(gdb) p text[i]\r\n$4 = (Text *) 0x5628dbd8\r\n(gdb) p *text[i]\r\nCannot access memory at address 0x5628dbd8\r\n```\r\n\r\nIt seems PIE is at fault here, which shuffles the addresses in the new samterm process(?)... is this code really passing pointers to global variables via a pipe? In a non-PIE build, text[i] is `cmd`, but not sure where that is defined really."}}
{"actor":{"display_login":"chneukirchen"}}