{"id":220,"date":"2018-10-15T15:20:34","date_gmt":"2018-10-15T07:20:34","guid":{"rendered":"http:\/\/cms.aaasec.com.tw\/?p=220"},"modified":"2018-10-16T16:16:10","modified_gmt":"2018-10-16T08:16:10","slug":"2018101501","status":"publish","type":"post","link":"https:\/\/cms.aaasec.com.tw\/index.php\/2018\/10\/15\/2018101501\/","title":{"rendered":"[\u5f31\u9ede\u8b66\u793a] \u8457\u540d\u7684\u7248\u672c\u63a7\u7ba1\u8edf\u9ad4\uff0dGit\u767c\u73fe\u91cd\u5927\u5f31\u9ede\uff01"},"content":{"rendered":"<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-228\" src=\"https:\/\/cms.aaasec.com.tw\/wp-content\/uploads\/2018\/10\/git-weakness-2.png\" alt=\"\" width=\"639\" height=\"579\" \/><\/p>\n<p><!--more--><\/p>\n<p>\u8fd1\u671fGit Project\u516c\u544a\u4e00\u91cd\u5927\u5f31\u9ede\uff0c\u7de8\u865f\u70baCVE-2018-17456\uff0c\u5176\u5b89\u5168\u6f0f\u6d1e\u8a55\u5206\u7cfb\u7d71CVSS v3\u9ad8\u90548.8\u5206(\u6700\u9ad8\u70ba10\u5206)\uff0c\u7121\u8ad6\u5c0d\u65bc\u7cfb\u7d71\u7684\u6a5f\u5bc6\u6027\u3001\u5b8c\u6574\u6027\u8207\u53ef\u7528\u6027\u90fd\u6703\u7522\u751f\u91cd\u5927\u7684\u5f71\u97ff\uff0c\u4e14\u99ed\u5ba2\u50c5\u9700\u900f\u904e\u7db2\u8def\u5373\u53ef\u5be6\u73fe\u76f8\u95dc\u653b\u64ca\uff0c\u63d0\u9192\u82e5\u6709\u4f7f\u7528Git\u7522\u54c1\u61c9\u7279\u5225\u6ce8\u610f\u3002<\/p>\n<p>\u5f31\u9ede\u4e3b\u8981\u767c\u751f\u5728\u5c07\u5132\u5b58\u5eab(Repository, Repo.)\u8907\u88fd\u56de\u672c\u6a5f\uff0c\u7576\u4f7f\u7528\u8005\u57f7\u884c\u8907\u88fd(Clone)\u6307\u4ee4\uff0c\u5c07\u542b\u6709\u60e1\u610f\u7a0b\u5f0f\u78bc\u7684\u5132\u5b58\u5eab\u8907\u88fd\u56de\u672c\u6a5f\u7aef\u6642\uff0c\u53ef\u80fd\u5728\u7121\u610f\u9593\u540c\u6642\u57f7\u884c\u4e86\u672a\u9810\u671f\u7684\u60e1\u610f\u7a0b\u5f0f\u78bc\u3002\u8a72\u5f31\u9ede\u8207Git Submodules\u5de5\u5177\u76f8\u95dc\uff0cSubmodules\u4e3b\u8981\u662f\u8b93\u7528\u6236\u5728\u81ea\u884c\u958b\u767c\u7684\u5c08\u6848\u4e2d\uff0c\u5f15\u5165\u4e26\u4f7f\u7528\u5916\u90e8\u5c08\u6848\u6216\u51fd\u5f0f\u5eab\u3002\u7576\u4f7f\u7528\u7684\u7b2c\u4e09\u65b9\u7a0b\u5f0f\u78bc\u8b8a\u66f4\u6642\uff0c\u639b\u8f09\u7684\u5c08\u6848\u5167\u5bb9\u4e5f\u5c07\u540c\u6b65\u66f4\u65b0\u3002\u8a72\u5f31\u9ede\u5141\u8a31\u60e1\u610f\u5132\u5b58\u5eab\u900f\u904e.gitmodules\u6a94\u6848\uff0c\u6307\u5411\u4e00\u958b\u982d\u542b\u6709\u201c-\u201d\u7684\u9060\u7aef\u5132\u5b58\u5eab\uff0c\u7576\u4f7f\u7528\u8005\u4f7f\u7528<code>git clone --recurse-submodules<\/code>\u53ca<code>git submodule update<\/code>\u6307\u4ee4\u6642\uff0c\u5373\u6703\u57f7\u884c\u8a72\u5c08\u6848\u4e2d\u7684\u4efb\u610f\u7a0b\u5f0f\u78bc\u3002<\/p>\n<p>\u96a8\u5f8c\uff0cGit Project\u5df2\u767c\u5e03Git v2.19.1\u7528\u4ee5\u4fee\u5fa9\u8a72\u5f31\u9ede\uff0c\u540c\u6642\u767c\u5e03\u4e86\u5176\u4ed6\u5148\u524d\u7248\u672c\u7684\u4fee\u6b63\u7a0b\u5f0f\uff0c\u5982v2.14.5\u3001v2.15.3\u3001v2.16.5\u3001v2.17.2\u53cav2.18.1\u3002\u91dd\u5c0d\u5df2\u66f4\u65b0\u7684\u7248\u672c\u4e2d\uff0cGit Project\u5c0d.gitmodules\u6a94\u6848\u9032\u884c\u6aa2\u67e5\uff0c\u52a0\u5f37\u9650\u5236\u689d\u4ef6\u4f86\u907f\u514d\u985e\u4f3c\u7684\u8106\u5f31\u9ede\u7522\u751f\u5728\u7a0b\u5f0f\u78bc\u4e2d\uff0c\u4e5f\u5c0e\u5165\u5075\u6e2c\u6a5f\u5236\u7528\u4ee5\u5bdf\u89ba\u6f5b\u5728\u60e1\u610f\u529f\u80fd\u7684Submodules\u3002\u9664\u6b64\u4e4b\u5916\uff0cGitHub.com\u53caGitHub Enterprise\u4e26\u672a\u906d\u53d7\u6b64\u5f31\u9ede\u7684\u5f71\u97ff\uff0c\u76ee\u524d\u4e0a\u8ff0\u539f\u59cb\u78bc\u4ee3\u7ba1\u670d\u52d9\u5747\u53ef\u5075\u6e2c\u5177\u5371\u5bb3\u6027\u7684\u5132\u5b58\u5eab\uff0c\u4e14\u6703\u62d2\u7d55\u5c0d\u5176\u57f7\u884c\u4e0a\u50b3(Push)\u6216API\u7684\u76f8\u95dc\u8acb\u6c42\u3002\u4e09\u7532\u79d1\u6280\u5f37\u70c8\u5efa\u8b70\u5927\u5bb6\u78ba\u8a8d\u6240\u5c6c\u55ae\u4f4d\u5167\u7684\u7528\u6236\u72c0\u6cc1\uff0c\u82e5\u6709\u4f7f\u7528\u65e9\u65bc\u4e0a\u8ff0\u7248\u672c\u4e4bGit\u7a0b\u5f0f\uff0c\u61c9\u7acb\u5373\u66f4\u65b0\u4ee5\u4fdd\u8b77\u7cfb\u7d71\u5b89\u5168\u3002<\/p>\n<h4>[\u53d7\u5f71\u97ff\u4e4b\u61c9\u7528\u7a0b\u5f0f\u53ca\u5efa\u8b70\u63aa\u65bd]<\/h4>\n<ul>\n<li>Git v2.13\u3001v2.13.1\u3001v2.13.2\u3001v2.13.3\u3001v2.13.4\u3001v2.13.5\u3001v2.13.6\u3001v2.14\u3001v2.14.1\u3001v2.14.2\u3001v2.14.3\u3001v2.14.4\u3001v2.15\u3001v2.15.1\u3001v2.15.2\u3001v2.16\u3001v2.16.3\u3001v2.16.4\u3001v2.17\u3001v2.17.1\u3001v2.18\u3001v2.19\u53ca\u4e4b\u524d\u7248\u672c(\u50c5\u5f71\u97ffUnix-like\u5e73\u53f0)\uff0c\u5efa\u8b70\u66f4\u65b0\u81f3v2.14.5\u3001v2.15.3\u3001v2.16.5\u3001v2.17.2\u3001v2.18.1\u53cav2.19.1\u3002<\/li>\n<li>GitHub\u684c\u6a5f\u72481.4.1\u53ca\u4e4b\u524d\u7248\u672c\uff0c\u5efa\u8b70\u66f4\u65b0\u81f31.4.2\u53ca1.4.3-beta0\u3002<\/li>\n<li>Atom\u6587\u5b57\u7de8\u8f2f\u5668(\u542bWindows\u3001MacOS\u53caLinux\u4e09\u7a2e\u7248\u672c)\uff0c\u5efa\u8b70\u66f4\u65b0\u81f31.31.2\u53ca1.32.0-beta3\u3002<\/li>\n<li>\u9664\u5efa\u8b70\u66f4\u65b0Git\u4e3b\u7a0b\u5f0f\u5916\uff0c\u4ea6\u5efa\u8b70\u66f4\u65b0\u5176\u4ed6\u5167\u5d4c\u6709Git\u529f\u80fd\u7684\u61c9\u7528\u7a0b\u5f0f\u6216\u958b\u767c\u5e73\u53f0\u3002<\/li>\n<\/ul>\n<h4 style=\"text-align: left;\">\u751f\u624b\u5c0f\u77e5\u8b58\uff0dGit\u662f\u4ec0\u9ebc\uff1f<\/h4>\n<p style=\"text-align: left;\">Git\u662f\u4e00\u6b3e\u5206\u6563\u5f0f\u7248\u672c\u63a7\u5236\u7cfb\u7d71\uff0c\u540c\u6642\u662f\u514d\u8cbb\u7684\u958b\u6e90\u5de5\u5177\uff0c\u80fd\u4f7f\u96fb\u8166\u5de5\u7a0b\u5e2b\u65b9\u4fbf\u7ba1\u7406\u6bcf\u4e00\u6b21\u66f4\u65b0\u7684\u7a0b\u5f0f\u78bc\u6a94\u6848\uff0c\u4e5f\u80fd\u9054\u5230\u6709\u6548\u5099\u4efd\u3002\u5e73\u6642\u6211\u5011\u53ef\u80fd\u5229\u7528\u6a94\u540d\u4f86\u5340\u5225\u4e0d\u540c\u6642\u9593\u5b8c\u6210\u7684\u5c08\u6848\u5167\u5bb9\uff0c\u5982\u6b64\u80fd\u9054\u5230\u5099\u4efd\u4f46\u537b\u7121\u6cd5\u5584\u7528\u9019\u4e9b\u6a94\u6848\uff0c\u800cGit\u80fd\u5e6b\u6211\u5011\u9054\u5230\u6b64\u76ee\u7684\u3002\u597d\u6bd4\u8aaa\u4f60\u4eca\u5929\u60f3\u8981\u67e5\u770bA\u5c08\u6848\u6bcf\u6b21\u7684\u8b8a\u66f4\u72c0\u6cc1\uff0cGit\u6703\u6a19\u793a\u51fa\u5167\u5bb9\u7684\u5dee\u7570\u5ea6\uff0c\u4f7f\u4f60\u6e05\u695a\u5206\u8fa8\u6bcf\u4e00\u6b21\u7684\u5b8c\u6210\u9032\u5ea6\uff0c\u56e0\u800c\u80fd\u6e96\u78ba\u7684\u638c\u63e1\u5c08\u6848\u3002<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>\u53c3\u8003\u8cc7\u6599<br \/>\n1. The GitHub Blog https:\/\/blog.github.com\/2018-10-05-git-submodule-vulnerability\/<br \/>\n2. CVE\u516c\u544a https:\/\/cve.mitre.org\/cgi-bin\/cvename.cgi?name=CVE-2018-17456<br \/>\n3. Git Submodule\u4ecb\u7d39\u8207\u4f7f\u7528 https:\/\/blog.wu-boy.com\/2011\/09\/introduction-to-git-submodule\/<br \/>\n4. \u4f7f\u7528Git Submodule\u7ba1\u7406\u5b50\u6a21\u584a\u00a0https:\/\/segmentfault.com\/a\/1190000003076028<br \/>\n5. Git\u5de5\u5177 https:\/\/git-scm.com\/book\/zh-tw\/v1\/Git-%E5%B7%A5%E5%85%B7-%E5%AD%90%E6%A8%A1%E7%B5%84-Submodules<br \/>\n6. Git\u73fe\u91cd\u5927\u6f0f\u6d1e\uff0cAtom\u4e5f\u6ce2\u53ca\uff0c\u5118\u5feb\u6253\u88dc\u4e01\uff01 https:\/\/t.cj.sina.com.cn\/articles\/view\/6533357275\/1856b1edb00100gdg2<br \/>\n7. Git\u5c08\u6848\u4fee\u88dc\u9060\u7aef\u7a0b\u5f0f\u653b\u64ca\u6f0f\u6d1e\uff0c\u4e0d\u53eaGitHub\u684c\u9762\u7248\u8edf\u9ad4\uff0c\u9023Atom\u90fd\u906d\u6b83 https:\/\/www.ithome.com.tw\/news\/126318<br \/>\n8. RedHat\u5f31\u9ede\u516c\u544a https:\/\/access.redhat.com\/security\/cve\/cve-2018-17456<br \/>\n9. SuSE\u5f31\u9ede\u516c\u544a https:\/\/www.suse.com\/security\/cve\/CVE-2018-17456\/<br \/>\n10. SecurityFocus\u5f31\u9ede\u516c\u544a https:\/\/www.securityfocus.com\/bid\/105523<br \/>\n11. git https:\/\/git-scm.com\/book\/zh-tw\/v2<br \/>\n12. \u4ec0\u9ebc\u662f Git\uff1f\u70ba\u4ec0\u9ebc\u8981\u5b78\u7fd2\u5b83\uff1f https:\/\/gitbook.tw\/chapters\/introduction\/what-is-git.html<\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[8,7],"_links":{"self":[{"href":"https:\/\/cms.aaasec.com.tw\/index.php\/wp-json\/wp\/v2\/posts\/220"}],"collection":[{"href":"https:\/\/cms.aaasec.com.tw\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cms.aaasec.com.tw\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cms.aaasec.com.tw\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cms.aaasec.com.tw\/index.php\/wp-json\/wp\/v2\/comments?post=220"}],"version-history":[{"count":10,"href":"https:\/\/cms.aaasec.com.tw\/index.php\/wp-json\/wp\/v2\/posts\/220\/revisions"}],"predecessor-version":[{"id":231,"href":"https:\/\/cms.aaasec.com.tw\/index.php\/wp-json\/wp\/v2\/posts\/220\/revisions\/231"}],"wp:attachment":[{"href":"https:\/\/cms.aaasec.com.tw\/index.php\/wp-json\/wp\/v2\/media?parent=220"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cms.aaasec.com.tw\/index.php\/wp-json\/wp\/v2\/categories?post=220"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cms.aaasec.com.tw\/index.php\/wp-json\/wp\/v2\/tags?post=220"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}