回答編集履歴
3
誤字修正
test
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Ubuntu 14.04LTSのgccはデフォルトでstack-protectorが`enable`になってようです。
|
1
|
+
Ubuntu 14.04LTSのgccはデフォルトでstack-protectorが`enable`になってるようです。
|
2
2
|
|
3
3
|
[Security/Features - Ubuntu Wiki](https://wiki.ubuntu.com/Security/Features)のStack Protectorの行参照。
|
4
4
|
|
2
不要な確認コードを削除
test
CHANGED
@@ -1,26 +1,6 @@
|
|
1
|
-
```
|
2
|
-
|
3
|
-
$ gcc a.c
|
4
|
-
|
5
|
-
$ ./a.out 323323332323232323432532523
|
6
|
-
|
7
|
-
zsh: segmentation fault (core dumped) ./a.out 323323332323232323432532523
|
8
|
-
|
9
|
-
$ gcc -fstack-protector-all a.c
|
10
|
-
|
11
|
-
$ ./a.out 323323332323232323432532523
|
12
|
-
|
13
|
-
*** stack smashing detected ***: ./a.out terminated
|
14
|
-
|
15
|
-
zsh: segmentation fault (core dumped) ./a.out 323323332323232323432532523
|
16
|
-
|
17
|
-
```
|
18
|
-
|
19
|
-
|
20
|
-
|
21
1
|
Ubuntu 14.04LTSのgccはデフォルトでstack-protectorが`enable`になってようです。
|
22
2
|
|
23
|
-
[Security/Features - Ubuntu Wiki](https://wiki.ubuntu.com/Security/Features)
|
3
|
+
[Security/Features - Ubuntu Wiki](https://wiki.ubuntu.com/Security/Features)のStack Protectorの行参照。
|
24
4
|
|
25
5
|
|
26
6
|
|
1
Ubuntuのgccへのセキュリティパッチについて、公式ドキュメントへのリンクを追加
test
CHANGED
@@ -18,7 +18,11 @@
|
|
18
18
|
|
19
19
|
|
20
20
|
|
21
|
-
Ubuntu 14.04LTSのgccはデフォルトでstack-protectorが`enable`になって
|
21
|
+
Ubuntu 14.04LTSのgccはデフォルトでstack-protectorが`enable`になってようです。
|
22
|
+
|
23
|
+
[Security/Features - Ubuntu Wiki](https://wiki.ubuntu.com/Security/Features)
|
24
|
+
|
25
|
+
|
22
26
|
|
23
27
|
`gcc -Q --help=common | grep stack`で確認してみてください。私の環境では`disable`になっていました。
|
24
28
|
|
@@ -76,4 +80,4 @@
|
|
76
80
|
|
77
81
|
|
78
82
|
|
79
|
-
|
83
|
+
`-fno-stack-protector`オプションで`disable`にできるかもしれません。オプションが反映されているかどうかは`gcc -Q -fno-stack-protector --help=common | grep stack`で確認することができます。
|