情報処理安全確保支援士試験に出そうなCERT C コーディングスタンダード | 乖離のぶろぐ(*´∀`)吸い込んで応援

CERT C コーディングスタンダード  目次

(゚ω゚)一通り、斜め読みして試験に出題されそうな物を挙げてみた。
 

PRE09-C. セキュアな関数を非推奨関数や時代遅れの関数に置き換えない

http://www.jpcert.or.jp/sc-rules/c-pre09-c.html

DCL04-C. ひとつの宣言で2つ以上の変数を宣言しない
http://www.jpcert.or.jp/sc-rules/c-dcl04-c.html

DCL10-C. 可変引数関数の作成者と利用者の間の取り決めを維持する
http://www.jpcert.or.jp/sc-rules/c-dcl10-c.html

EXP03-C. 構造体のサイズが構造体のメンバのサイズの和に等しいと決めてかからない
http://www.jpcert.or.jp/sc-rules/c-exp03-c.html

EXP10-C. 部分式の評価順序や副作用の発生順序に依存しない
http://www.jpcert.or.jp/sc-rules/c-exp10-c.html

EXP16-C. 関数ポインタを定数値と比較しない
http://www.jpcert.or.jp/sc-rules/c-exp16-c.html

INT08-C. すべての整数値が範囲内にあることを確認する
http://www.jpcert.or.jp/sc-rules/c-int08-c.html

INT30-C. 符号無し整数の演算結果がラップアラウンドしないようにする
http://www.jpcert.or.jp/sc-rules/c-int30-c.html

ラップアラウンド

 

https://www.weblio.jp/content/%e3%83%a9%e3%83%83%e3%83%97%e3%82%a2%e3%83%a9%e3%82%a6%e3%83%b3%e3%83%89

INT32-C. 符号付き整数演算がオーバーフローを引き起こさないことを保証する
http://www.jpcert.or.jp/sc-rules/c-int32-c.html

INT33-C. 除算および剰余演算がゼロ除算エラーを引き起こさないことを保証する

http://www.jpcert.or.jp/sc-rules/c-int33-c.html

STR06-C. strtok() が分割対象文字列を変更しないと想定しない
http://www.jpcert.or.jp/sc-rules/c-str06-c.html

MEM01-C. free() した直後のポインタには新しい値を代入する
http://www.jpcert.or.jp/sc-rules/c-mem01-c.html

MEM03-C. 再利用可能なリソースに格納された機密情報は消去する
http://www.jpcert.or.jp/sc-rules/c-mem03-c.html

MEM06-C. 機密情報はディスクに書き出さない
http://www.jpcert.or.jp/sc-rules/c-mem06-c.html

FIO16-C. ジェイル(監獄)を作成してファイルへのアクセスを制限する
http://www.jpcert.or.jp/sc-rules/c-fio16-c.html

FIO21-C. 一時ファイルを共有ディレクトリに作成しない
http://www.jpcert.or.jp/sc-rules/c-fio21-c.html

ENV03-C. 外部プログラムを呼び出す際は環境を無害化する
http://www.jpcert.or.jp/sc-rules/c-env03-c.html
ENV33-C. コマンドプロセッサが必要ない場合は system() を呼び出さない
http://www.jpcert.or.jp/sc-rules/c-env33-c.html
ENV34-C. getenv() が返す文字列へのポインタを保存しない
http://www.jpcert.or.jp/sc-rules/c-env34-c.html
API00-C. 関数のなかで引数を検証する
http://www.jpcert.or.jp/sc-rules/c-api00-c.html
API02-C. 配列の読み書きを行う関数はコピー元やコピー先のサイズを指定する引数を取れ
http://www.jpcert.or.jp/sc-rules/c-api02-c.html
CON00-C. 複数のスレッドによる競合状態を避ける
http://www.jpcert.or.jp/sc-rules/c-con00-c.html
CON32-C. 複数スレッドによる隣接データへのアクセスが必要な場合データ競合を防止する
http://www.jpcert.or.jp/sc-rules/c-con32-c.html
MSC18-C. プログラムコードの中でパスワードなどの機密情報を扱うときは注意する
http://www.jpcert.or.jp/sc-rules/c-msc18-c.html

MSC24-C. 非推奨関数や時代遅れの関数を使用しない

http://www.jpcert.or.jp/sc-rules/c-msc24-c.html