secret
Last active

This email thread is from security@ruby-lang.org about Ruby's SSL/TLS client insecurity. The output of this was https://bugs.ruby-lang.org/issues/9424

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629
Subject: ruby 1.9 & 2.1 susceptible to the CRIME attack and uses weak cipher suites
From: Jeff Hodges <jeff@somethingsimilar.com>
To: security@ruby-lang.org
Date: Sun, 12 Jan 2014 18:21:10 -0800
 
Given ordinary code[1] on OS X 10.8 (at least), Ruby 1.9-p374 and 2.1
defaults to enabling TLS compression making it susceptible to the CRIME
attack[2].
 
Ruby 1.9-p374 and 2.1 also use a variety of insecure cipher suites. These
cipher suites either use key sizes much smaller than the currently
recommended 128-bits or do not check the veracity of the server's
certificate making them susceptible to man-in-the-middle attacks[3][4].
 
Reproducing these settings can be used with the given code in [1].
 
[1] https://gist.github.com/cscotta/8302049
[2] https://www.howsmyssl.com/s/about.html#tls-compression
[3] https://www.howsmyssl.com/s/about.html#insecure-cipher-suites
[4] TLS_DHE_DSS_WITH_DES_CBC_SHA - small keys
TLS_DHE_RSA_WITH_DES_CBC_SHA - small keys
TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA - MITM
TLS_ECDH_anon_WITH_AES_128_CBC_SHA - MITM
TLS_ECDH_anon_WITH_AES_256_CBC_SHA - MITM
TLS_ECDH_anon_WITH_RC4_128_SHA - MITM
TLS_RSA_WITH_DES_CBC_SHA - small keys
TLS_SRP_SHA_WITH_3DES_EDE_CBC_SHA - MITM
TLS_SRP_SHA_WITH_AES_128_CBC_SHA - MITM
TLS_SRP_SHA_WITH_AES_256_CBC_SHA - MITM
 
Subject: Re: ruby 1.9 & 2.1 susceptible to the CRIME attack and uses weak cipher suites
From: Jeff Hodges <jeff@somethingsimilar.com>
To: security@ruby-lang.org
Date: Sun, 12 Jan 2014 18:28:03 -0800
 
For clarity, this is also, of course, true for Ruby 2.0.
 
 
On Sun, Jan 12, 2014 at 6:21 PM, Jeff Hodges <jeff@somethingsimilar.com>wrote:
 
> Given ordinary code[1] on OS X 10.8 (at least), Ruby 1.9-p374 and 2.1
> defaults to enabling TLS compression making it susceptible to the CRIME
> attack[2].
>
> Ruby 1.9-p374 and 2.1 also use a variety of insecure cipher suites. These
> cipher suites either use key sizes much smaller than the currently
> recommended 128-bits or do not check the veracity of the server's
> certificate making them susceptible to man-in-the-middle attacks[3][4].
>
> Reproducing these settings can be used with the given code in [1].
>
> [1] https://gist.github.com/cscotta/8302049
> [2] https://www.howsmyssl.com/s/about.html#tls-compression
> [3] https://www.howsmyssl.com/s/about.html#insecure-cipher-suites
> [4] TLS_DHE_DSS_WITH_DES_CBC_SHA - small keys
> TLS_DHE_RSA_WITH_DES_CBC_SHA - small keys
> TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA - MITM
> TLS_ECDH_anon_WITH_AES_128_CBC_SHA - MITM
> TLS_ECDH_anon_WITH_AES_256_CBC_SHA - MITM
> TLS_ECDH_anon_WITH_RC4_128_SHA - MITM
> TLS_RSA_WITH_DES_CBC_SHA - small keys
> TLS_SRP_SHA_WITH_3DES_EDE_CBC_SHA - MITM
> TLS_SRP_SHA_WITH_AES_128_CBC_SHA - MITM
> TLS_SRP_SHA_WITH_AES_256_CBC_SHA - MITM
>
>
 
Subject: Re: ruby 1.9 & 2.1 susceptible to the CRIME attack and uses weak cipher suites
From: Nobuyoshi Nakada <nobu@ruby-lang.org>
To: Jeff Hodges <jeff@somethingsimilar.com>, security@ruby-lang.org
Date: Mon, 13 Jan 2014 11:42:49 +0900
 
(2014/01/13 11:28), Jeff Hodges wrote:
> For clarity, this is also, of course, true for Ruby 2.0.
>
>
> On Sun, Jan 12, 2014 at 6:21 PM, Jeff Hodges <jeff@somethingsimilar.com>wrote:
>
>> Given ordinary code[1] on OS X 10.8 (at least), Ruby 1.9-p374 and 2.1
>> defaults to enabling TLS compression making it susceptible to the CRIME
>> attack[2].
>>
>> Ruby 1.9-p374 and 2.1 also use a variety of insecure cipher suites. These
>> cipher suites either use key sizes much smaller than the currently
>> recommended 128-bits or do not check the veracity of the server's
>> certificate making them susceptible to man-in-the-middle attacks[3][4].
 
Thank you for the report.
How is this issue urgent?
 
 
 
Subject: Re: ruby 1.9 & 2.1 susceptible to the CRIME attack and uses weak cipher suites
From: Jeff Hodges <jeff@somethingsimilar.com>
To: Nobuyoshi Nakada <nobu@ruby-lang.org>
Cc: security@ruby-lang.org
Date: Sun, 12 Jan 2014 18:51:59 -0800
 
I can provide a public report if you would prefer that.
 
These are real issues with viable, known-for-many-years attacks against
them.
 
 
On Sun, Jan 12, 2014 at 6:42 PM, Nobuyoshi Nakada <nobu@ruby-lang.org>wrote:
 
> (2014/01/13 11:28), Jeff Hodges wrote:
> > For clarity, this is also, of course, true for Ruby 2.0.
> >
> >
> > On Sun, Jan 12, 2014 at 6:21 PM, Jeff Hodges <jeff@somethingsimilar.com
> >wrote:
> >
> >> Given ordinary code[1] on OS X 10.8 (at least), Ruby 1.9-p374 and 2.1
> >> defaults to enabling TLS compression making it susceptible to the CRIME
> >> attack[2].
> >>
> >> Ruby 1.9-p374 and 2.1 also use a variety of insecure cipher suites.
> These
> >> cipher suites either use key sizes much smaller than the currently
> >> recommended 128-bits or do not check the veracity of the server's
> >> certificate making them susceptible to man-in-the-middle attacks[3][4].
>
> Thank you for the report.
> How is this issue urgent?
>
>
>
 
Subject: Re: ruby 1.9 & 2.1 susceptible to the CRIME attack and uses weak cipher suites
From: Nobuyoshi Nakada <nobu@ruby-lang.org>
To: Jeff Hodges <jeff@somethingsimilar.com>
Cc: security@ruby-lang.org
Date: Mon, 13 Jan 2014 12:13:59 +0900
 
(2014/01/13 11:51), Jeff Hodges wrote:
> I can provide a public report if you would prefer that.
>
> These are real issues with viable, known-for-many-years attacks against
> them.
 
Thank you, I see.
 
And another question, is this a vulnerability in ext/openssl,
not in the underlying TLS library?
 
 
 
Subject: Re: ruby 1.9 & 2.1 susceptible to the CRIME attack and uses weak cipher suites
From: Jeff Hodges <jeff@somethingsimilar.com>
To: Nobuyoshi Nakada <nobu@ruby-lang.org>
Cc: security@ruby-lang.org
Date: Sun, 12 Jan 2014 19:23:08 -0800
 
On fairly old OpenSSL implementations (>0.9.8), the defaults include only
some the low key size export ciphers. I believe 0.9.8 disabled TLS
compression, as well. Modern implementations of OpenSSL (~1.0.1e) disable
TLS compression but still include some of the low key size export ciphers.
None of those, to my knowledge, supported the anonymous cipher suites by
default.
 
I would be surprised if the problem was due to an out of date OpenSSL given
that those Ruby versions are also using TLS 1.2, but perhaps it was patched
oddly.
 
 
On Sun, Jan 12, 2014 at 7:13 PM, Nobuyoshi Nakada <nobu@ruby-lang.org>wrote:
 
> (2014/01/13 11:51), Jeff Hodges wrote:
> > I can provide a public report if you would prefer that.
> >
> > These are real issues with viable, known-for-many-years attacks against
> > them.
>
> Thank you, I see.
>
> And another question, is this a vulnerability in ext/openssl,
> not in the underlying TLS library?
>
>
>
 
Subject: Re: ruby 1.9 & 2.1 susceptible to the CRIME attack and uses weak cipher suites
From: =?ISO-8859-1?Q?Martin_Bo=DFlet?= <martin.bosslet@gmail.com>
To: Jeff Hodges <jeff@somethingsimilar.com>
Cc: Nobuyoshi Nakada <nobu@ruby-lang.org>, security <security@ruby-lang.org>
Date: Mon, 13 Jan 2014 04:56:02 +0100
 
In the gist you sent, Net::HTTP uses Ruby's OpenSSL extension, which just
uses the defaults of OpenSSL itself. For example, if I run the gist on my
computer, these are my results:
 
> ruby -v
ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-linux]
 
> ruby -ropenssl -e "puts OpenSSL::OPENSSL_VERSION"
OpenSSL 1.0.1f 6 Jan 2014
 
> ruby howsmytls.rb
{
"given_cipher_suites": [
"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",
"TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384",
"TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384",
"TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA",
"TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA",
"TLS_SRP_SHA_DSS_WITH_AES_256_CBC_SHA",
"TLS_SRP_SHA_RSA_WITH_AES_256_CBC_SHA",
"TLS_DHE_DSS_WITH_AES_256_GCM_SHA384",
"TLS_DHE_RSA_WITH_AES_256_GCM_SHA384",
"TLS_DHE_RSA_WITH_AES_256_CBC_SHA256",
"TLS_DHE_DSS_WITH_AES_256_CBC_SHA256",
"TLS_DHE_RSA_WITH_AES_256_CBC_SHA",
"TLS_DHE_DSS_WITH_AES_256_CBC_SHA",
"TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA",
"TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA",
"TLS_ECDH_anon_WITH_AES_256_CBC_SHA",
"TLS_SRP_SHA_WITH_AES_256_CBC_SHA",
"TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384",
"TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384",
"TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384",
"TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384",
"TLS_ECDH_RSA_WITH_AES_256_CBC_SHA",
"TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA",
"TLS_RSA_WITH_AES_256_GCM_SHA384",
"TLS_RSA_WITH_AES_256_CBC_SHA256",
"TLS_RSA_WITH_AES_256_CBC_SHA",
"TLS_RSA_WITH_CAMELLIA_256_CBC_SHA",
"TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA",
"TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA",
"TLS_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA",
"TLS_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA",
"TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA",
"TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA",
"TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA",
"TLS_SRP_SHA_WITH_3DES_EDE_CBC_SHA",
"TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA",
"TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA",
"TLS_RSA_WITH_3DES_EDE_CBC_SHA",
"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
"TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256",
"TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256",
"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA",
"TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA",
"TLS_SRP_SHA_DSS_WITH_AES_128_CBC_SHA",
"TLS_SRP_SHA_RSA_WITH_AES_128_CBC_SHA",
"TLS_DHE_DSS_WITH_AES_128_GCM_SHA256",
"TLS_DHE_RSA_WITH_AES_128_GCM_SHA256",
"TLS_DHE_RSA_WITH_AES_128_CBC_SHA256",
"TLS_DHE_DSS_WITH_AES_128_CBC_SHA256",
"TLS_DHE_RSA_WITH_AES_128_CBC_SHA",
"TLS_DHE_DSS_WITH_AES_128_CBC_SHA",
"TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA",
"TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA",
"TLS_ECDH_anon_WITH_AES_128_CBC_SHA",
"TLS_SRP_SHA_WITH_AES_128_CBC_SHA",
"TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256",
"TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256",
"TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256",
"TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256",
"TLS_ECDH_RSA_WITH_AES_128_CBC_SHA",
"TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA",
"TLS_RSA_WITH_AES_128_GCM_SHA256",
"TLS_RSA_WITH_AES_128_CBC_SHA256",
"TLS_RSA_WITH_AES_128_CBC_SHA",
"TLS_RSA_WITH_CAMELLIA_128_CBC_SHA",
"TLS_DHE_RSA_WITH_SEED_CBC_SHA",
"TLS_DHE_DSS_WITH_SEED_CBC_SHA",
"TLS_RSA_WITH_SEED_CBC_SHA",
"TLS_RSA_WITH_IDEA_CBC_SHA",
"TLS_ECDHE_RSA_WITH_RC4_128_SHA",
"TLS_ECDHE_ECDSA_WITH_RC4_128_SHA",
"TLS_ECDH_anon_WITH_RC4_128_SHA",
"TLS_ECDH_RSA_WITH_RC4_128_SHA",
"TLS_ECDH_ECDSA_WITH_RC4_128_SHA",
"TLS_RSA_WITH_RC4_128_SHA",
"TLS_RSA_WITH_RC4_128_MD5",
"TLS_DHE_RSA_WITH_DES_CBC_SHA",
"TLS_DHE_DSS_WITH_DES_CBC_SHA",
"TLS_RSA_WITH_DES_CBC_SHA",
"TLS_EMPTY_RENEGOTIATION_INFO_SCSV"
],
"ephemeral_keys_supported": true,
"session_ticket_supported": true,
"tls_compression_supported": false,
"unknown_cipher_suite_supported": false,
"beast_vuln": false,
"able_to_detect_n_minus_one_splitting": false,
"insecure_cipher_suites": {
"TLS_DHE_DSS_WITH_DES_CBC_SHA": [
"uses keys smaller than 128 bits in its encryption"
],
"TLS_DHE_RSA_WITH_DES_CBC_SHA": [
"uses keys smaller than 128 bits in its encryption"
],
"TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA": [
"is open to man-in-the-middle attacks because it does not
authenticate the server"
],
"TLS_ECDH_anon_WITH_AES_128_CBC_SHA": [
"is open to man-in-the-middle attacks because it does not
authenticate the server"
],
"TLS_ECDH_anon_WITH_AES_256_CBC_SHA": [
"is open to man-in-the-middle attacks because it does not
authenticate the server"
],
"TLS_ECDH_anon_WITH_RC4_128_SHA": [
"is open to man-in-the-middle attacks because it does not
authenticate the server"
],
"TLS_RSA_WITH_DES_CBC_SHA": [
"uses keys smaller than 128 bits in its encryption"
],
"TLS_SRP_SHA_WITH_3DES_EDE_CBC_SHA": [
"is open to man-in-the-middle attacks because it does not
authenticate the server"
],
"TLS_SRP_SHA_WITH_AES_128_CBC_SHA": [
"is open to man-in-the-middle attacks because it does not
authenticate the server"
],
"TLS_SRP_SHA_WITH_AES_256_CBC_SHA": [
"is open to man-in-the-middle attacks because it does not
authenticate the server"
]
},
"tls_version": "TLS 1.2",
"rating": "Bad"
}
 
In particular: "tls_compression_supported": false
 
This is just to say that the output does not depend on which Ruby version
you are using but rather on which OpenSSL version it was linked against. In
my case, OpenSSL 1.0.1f already disables TLS compression, but it still
includes the weak ciphers.
 
As we are using OpenSSL's defaults, we could claim it's their concern to
fix this. However, for BEAST, we did implement our own fix at the time,
before OpenSSL fixed it on their end. But as Ruby OpenSSL is considered to
be just a thin wrapper for the OpenSSL C library, we'd like to avoid custom
code when possible. I'd suggest first asking OpenSSL maintainers if they'd
be willing to fix this on their end, so everyone depending on OpenSSL could
benefit from the fix. You would see the exact same results if you spin up
an http request using the OpenSSL API for TLS sockets directly.
 
Subject: Re: ruby 1.9 & 2.1 susceptible to the CRIME attack and uses weak cipher suites
From: Jeff Hodges <jeff@somethingsimilar.com>
To: =?UTF-8?Q?Martin_Bo=C3=9Flet?= <martin.bosslet@gmail.com>
Cc: Nobuyoshi Nakada <nobu@ruby-lang.org>, security <security@ruby-lang.org>
Date: Sun, 12 Jan 2014 20:06:05 -0800
 
The rubies I have installed are built against a modern OpenSSL, 1.0.1f[1].
As I mentioned before, the only problems in OpenSSL's libraries were the
export cipher suites, but not the anon ones.
 
Plus, OpenSSL can't correct everyone's already installed versions, so it is
on important clients to fix problems as they can. Python and curl are
already doing this.
 
This is Ruby's problem, not OpenSSL's
 
[1]
$ otool -L /opt/local/lib/ruby2.1/2.1.0/x86_64-darwin12/openssl.bundle |
egrep 'lib(ssl|crypto)'
/opt/local/lib/libssl.1.0.0.dylib (compatibility version 1.0.0,
current version 1.0.0)
/opt/local/lib/libcrypto.1.0.0.dylib (compatibility version 1.0.0,
current version 1.0.0)
$ port provides /opt/local/lib/libssl.1.0.0.dylib
/opt/local/lib/libssl.1.0.0.dylib is provided by: openssl
$ port provides /opt/local/lib/libcrypto.1.0.0.dylib
/opt/local/lib/libcrypto.1.0.0.dylib is provided by: openssl
$ port installed openssl | grep active
openssl @1.0.1f_0 (active)
 
 
Subject: ruby 1.9 & 2.1 susceptible to the CRIME attack and uses weak cipher suites
From: Nobuyoshi Nakada <nobu@ruby-lang.org>
To: Jeff Hodges <jeff@somethingsimilar.com>
Cc: =?ISO-8859-1?Q?Martin_Bo=DFlet?= <martin.bosslet@gmail.com>, Nobuyoshi Nakada <nobu@ruby-lang.org>, security <security@ruby-lang.org>
Date: Mon, 13 Jan 2014 14:11:40 +0900
 
Hi,
 
(2014/01/13 13:06), Jeff Hodges wrote:
 
> The rubies I have installed are built against a modern OpenSSL, 1.0.1f[1].
> As I mentioned before, the only problems in OpenSSL's libraries were the
> export cipher suites, but not the anon ones.
>
 
Do you mean that:
(1) OpenSSL already has deprecated and disabled that option by default,
(2) but Ruby's openssl ext enables it?
 
Subject: Re: ruby 1.9 & 2.1 susceptible to the CRIME attack and uses weak cipher suites
From: Jeff Hodges <jeff@somethingsimilar.com>
To: Nobuyoshi Nakada <nobu@ruby-lang.org>
Cc: =?UTF-8?Q?Martin_Bo=C3=9Flet?= <martin.bosslet@gmail.com>, security <security@ruby-lang.org>
Date: Sun, 12 Jan 2014 21:30:53 -0800
 
It doesn't matter if OpenSSL has broken defaults or not. Ruby has to own
its security. It's too well-used and too often more easily updated for it
to wait for every library it relies on to fix every broken default.
 
This is a clear report of very problematic issues and they need correction.
 
 
 
On Sun, Jan 12, 2014 at 9:11 PM, Nobuyoshi Nakada <nobu@ruby-lang.org>wrote:
 
> Hi,
>
>
> (2014/01/13 13:06), Jeff Hodges wrote:
>
>> The rubies I have installed are built against a modern OpenSSL,
>> 1.0.1f[1]. As I mentioned before, the only problems in OpenSSL's libraries
>> were the export cipher suites, but not the anon ones.
>>
>
> Do you mean that:
> (1) OpenSSL already has deprecated and disabled that option by default,
> (2) but Ruby's openssl ext enables it?
>
>
 
Subject: Re: ruby 1.9 & 2.1 susceptible to the CRIME attack and uses weak cipher suites
From: =?ISO-8859-1?Q?Martin_Bo=DFlet?= <martin.bosslet@gmail.com>
To: Jeff Hodges <jeff@somethingsimilar.com>
Date: Mon, 13 Jan 2014 07:27:06 +0100
 
Nobody is saying that your findings are not important! But again, Ruby
OpenSSL follows the defaults set up by OpenSSL itself.
 
Here is the cipher list you get from OpenSSL (1.0.1f):
 
#include <openssl/ssl.h>
 
int main(int argc, char *argv[]) {
SSL_CTX *ctx;
STACK_OF(SSL_CIPHER) *ciphers;
SSL_CIPHER *cipher;
int i, num;
int bits, alg_bits;
 
SSL_library_init();
SSL_load_error_strings();
ctx = SSL_CTX_new(TLSv1_2_method());
 
ciphers = ctx->cipher_list;
 
num = sk_SSL_CIPHER_num(ciphers);
for(i = 0; i < num; i++) {
cipher = sk_SSL_CIPHER_value(ciphers, i);
printf("%s\n", SSL_CIPHER_get_name(cipher));
}
}
 
It's exactly the same as in Ruby when linked against OpenSSL 1.0.1f:
 
require 'openssl'
 
ctx = OpenSSL::SSL::SSLContext.new
ctx.ssl_version = :TLSv1_2
ctx.ciphers.map(&:first).join("\n")
 
 
I'm not happy with these defaults either, but it's not very practical to do
a "custom OpenSSL" for Ruby. It can even be dangerous: the Debian bug a
couple of years back demonstrated pretty impressively what might happen if
people start to roll their own OpenSSL. If anyone is unhappy with OpenSSL's
defaults, at least they can configure their SSLContext instance
differently. The options to turn off compression [1] and to use a tighter
set of ciphers [2] are there.
 
I agree that OpenSSL can't be held accountable for any mistake clients make
with their library. But we are merely using their defaults, and keeping
those sane and safe is obviously in their domain, not ours. I'm not saying
these defaults are less than optimal, though, I'd just like them to be
fixed in OpenSSL itself.
 
[1]
https://github.com/ruby/ruby/blob/738c298ce0b832edf5bbd2caed662c1e728a2aa8/ext/openssl/ossl_ssl.c#L2265
[2]
https://github.com/ruby/ruby/blob/738c298ce0b832edf5bbd2caed662c1e728a2aa8/ext/openssl/ossl_ssl.c#L876
 
 
2014/1/13 Jeff Hodges <jeff@somethingsimilar.com>
 
> It doesn't matter if OpenSSL has broken defaults or not. Ruby has to own
> its security. It's too well-used and too often more easily updated for it
> to wait for every library it relies on to fix every broken default.
>
> This is a clear report of very problematic issues and they need correction.
>
>
>
> On Sun, Jan 12, 2014 at 9:11 PM, Nobuyoshi Nakada <nobu@ruby-lang.org>wrote:
>
>> Hi,
>>
>>
>> (2014/01/13 13:06), Jeff Hodges wrote:
>>
>>> The rubies I have installed are built against a modern OpenSSL,
>>> 1.0.1f[1]. As I mentioned before, the only problems in OpenSSL's libraries
>>> were the export cipher suites, but not the anon ones.
>>>
>>
>> Do you mean that:
>> (1) OpenSSL already has deprecated and disabled that option by default,
>> (2) but Ruby's openssl ext enables it?
>>
>>
>
 
Subject: Re: ruby 1.9 & 2.1 susceptible to the CRIME attack and uses weak cipher suites
From: =?ISO-8859-1?Q?Martin_Bo=DFlet?= <martin.bosslet@gmail.com>
To: Jeff Hodges <jeff@somethingsimilar.com>
Cc: Nobuyoshi Nakada <nobu@ruby-lang.org>, security <security@ruby-lang.org>
Date: Mon, 13 Jan 2014 07:27:54 +0100
 
Nobody is saying that your findings are not important! But again, Ruby
OpenSSL follows the defaults set up by OpenSSL itself.
 
Here is the cipher list you get from OpenSSL (1.0.1f):
 
#include <openssl/ssl.h>
 
int main(int argc, char *argv[]) {
SSL_CTX *ctx;
STACK_OF(SSL_CIPHER) *ciphers;
SSL_CIPHER *cipher;
int i, num;
int bits, alg_bits;
 
SSL_library_init();
SSL_load_error_strings();
ctx = SSL_CTX_new(TLSv1_2_method());
 
ciphers = ctx->cipher_list;
 
num = sk_SSL_CIPHER_num(ciphers);
for(i = 0; i < num; i++) {
cipher = sk_SSL_CIPHER_value(ciphers, i);
printf("%s\n", SSL_CIPHER_get_name(cipher));
}
}
 
It's exactly the same as in Ruby when linked against OpenSSL 1.0.1f:
 
require 'openssl'
 
ctx = OpenSSL::SSL::SSLContext.new
ctx.ssl_version = :TLSv1_2
ctx.ciphers.map(&:first).join("\n")
 
 
I'm not happy with these defaults either, but it's not very practical to do
a "custom OpenSSL" for Ruby. It can even be dangerous: the Debian bug a
couple of years back demonstrated pretty impressively what might happen if
people start to roll their own OpenSSL. If anyone is unhappy with OpenSSL's
defaults, at least they can configure their SSLContext instance
differently. The options to turn off compression [1] and to use a tighter
set of ciphers [2] are there.
 
I agree that OpenSSL can't be held accountable for any mistake clients make
with their library. But we are merely using their defaults, and keeping
those sane and safe is obviously in their domain, not ours. I'm not saying
these defaults are less than optimal, though, I'd just like them to be
fixed in OpenSSL itself.
 
[1]
https://github.com/ruby/ruby/blob/738c298ce0b832edf5bbd2caed662c1e728a2aa8/ext/openssl/ossl_ssl.c#L2265
[2]
https://github.com/ruby/ruby/blob/738c298ce0b832edf5bbd2caed662c1e728a2aa8/ext/openssl/ossl_ssl.c#L876
 
 
2014/1/13 Jeff Hodges <jeff@somethingsimilar.com>
 
> It doesn't matter if OpenSSL has broken defaults or not. Ruby has to own
> its security. It's too well-used and too often more easily updated for it
> to wait for every library it relies on to fix every broken default.
>
> This is a clear report of very problematic issues and they need correction.
>
>
>
> On Sun, Jan 12, 2014 at 9:11 PM, Nobuyoshi Nakada <nobu@ruby-lang.org>wrote:
>
>> Hi,
>>
>>
>> (2014/01/13 13:06), Jeff Hodges wrote:
>>
>>> The rubies I have installed are built against a modern OpenSSL,
>>> 1.0.1f[1]. As I mentioned before, the only problems in OpenSSL's libraries
>>> were the export cipher suites, but not the anon ones.
>>>
>>
>> Do you mean that:
>> (1) OpenSSL already has deprecated and disabled that option by default,
>> (2) but Ruby's openssl ext enables it?
>>
>>
>
 
Subject: Re: ruby 1.9 & 2.1 susceptible to the CRIME attack and uses weak cipher suites
From: Jeff Hodges <jeff@somethingsimilar.com>
To: =?UTF-8?Q?Martin_Bo=C3=9Flet?= <martin.bosslet@gmail.com>
Cc: Nobuyoshi Nakada <nobu@ruby-lang.org>, security <security@ruby-lang.org>
Date: Sun, 12 Jan 2014 22:35:52 -0800
 
I have tickets going to improve the OpenSSL defaults. Remember, OpenSSL is
under FIPS compliance rules and it's release process is very, very slow.
 
The conversation so far has been about OpenSSL, and we've not discussed
what Ruby is going to do.
 
So, what is Ruby going to do for its defaults?
 
 
On Sun, Jan 12, 2014 at 10:27 PM, Martin Boßlet <martin.bosslet@gmail.com>wrote:
 
> Nobody is saying that your findings are not important! But again, Ruby
> OpenSSL follows the defaults set up by OpenSSL itself.
>
> Here is the cipher list you get from OpenSSL (1.0.1f):
>
> #include <openssl/ssl.h>
>
> int main(int argc, char *argv[]) {
> SSL_CTX *ctx;
> STACK_OF(SSL_CIPHER) *ciphers;
> SSL_CIPHER *cipher;
> int i, num;
> int bits, alg_bits;
>
> SSL_library_init();
> SSL_load_error_strings();
> ctx = SSL_CTX_new(TLSv1_2_method());
>
> ciphers = ctx->cipher_list;
>
> num = sk_SSL_CIPHER_num(ciphers);
> for(i = 0; i < num; i++) {
> cipher = sk_SSL_CIPHER_value(ciphers, i);
> printf("%s\n", SSL_CIPHER_get_name(cipher));
> }
> }
>
> It's exactly the same as in Ruby when linked against OpenSSL 1.0.1f:
>
> require 'openssl'
>
> ctx = OpenSSL::SSL::SSLContext.new
> ctx.ssl_version = :TLSv1_2
> ctx.ciphers.map(&:first).join("\n")
>
>
> I'm not happy with these defaults either, but it's not very practical to
> do a "custom OpenSSL" for Ruby. It can even be dangerous: the Debian bug a
> couple of years back demonstrated pretty impressively what might happen if
> people start to roll their own OpenSSL. If anyone is unhappy with OpenSSL's
> defaults, at least they can configure their SSLContext instance
> differently. The options to turn off compression [1] and to use a tighter
> set of ciphers [2] are there.
>
> I agree that OpenSSL can't be held accountable for any mistake clients
> make with their library. But we are merely using their defaults, and
> keeping those sane and safe is obviously in their domain, not ours. I'm not
> saying these defaults are less than optimal, though, I'd just like them to
> be fixed in OpenSSL itself.
>
> [1]
> https://github.com/ruby/ruby/blob/738c298ce0b832edf5bbd2caed662c1e728a2aa8/ext/openssl/ossl_ssl.c#L2265
> [2]
> https://github.com/ruby/ruby/blob/738c298ce0b832edf5bbd2caed662c1e728a2aa8/ext/openssl/ossl_ssl.c#L876
>
>
> 2014/1/13 Jeff Hodges <jeff@somethingsimilar.com>
>
>> It doesn't matter if OpenSSL has broken defaults or not. Ruby has to own
>> its security. It's too well-used and too often more easily updated for it
>> to wait for every library it relies on to fix every broken default.
>>
>> This is a clear report of very problematic issues and they need
>> correction.
>>
>>
>>
>> On Sun, Jan 12, 2014 at 9:11 PM, Nobuyoshi Nakada <nobu@ruby-lang.org>wrote:
>>
>>> Hi,
>>>
>>>
>>> (2014/01/13 13:06), Jeff Hodges wrote:
>>>
>>>> The rubies I have installed are built against a modern OpenSSL,
>>>> 1.0.1f[1]. As I mentioned before, the only problems in OpenSSL's libraries
>>>> were the export cipher suites, but not the anon ones.
>>>>
>>>
>>> Do you mean that:
>>> (1) OpenSSL already has deprecated and disabled that option by default,
>>> (2) but Ruby's openssl ext enables it?
>>>
>>>
>>
>
 
Subject: Re: ruby 1.9 & 2.1 susceptible to the CRIME attack and uses weak cipher suites
From: Nobuyoshi Nakada <nobu@ruby-lang.org>
To: Jeff Hodges <jeff@somethingsimilar.com>, =?UTF-8?B?TWFydGluIEJvw59sZXQ=?= <martin.bosslet@gmail.com>
Cc: security <security@ruby-lang.org>
Date: Mon, 13 Jan 2014 16:22:05 +0900
 
(2014/01/13 15:35), Jeff Hodges wrote:
> I have tickets going to improve the OpenSSL defaults. Remember, OpenSSL is
> under FIPS compliance rules and it's release process is very, very slow.
 
OK, I think I understand now.
You say we should make "short-term" workaround for OpenSSL instead of
OpenSSL, correct?
 
> The conversation so far has been about OpenSSL, and we've not discussed
> what Ruby is going to do.
 
Because it's an issue of OpenSSL essentially, not Ruby.
 
> So, what is Ruby going to do for its defaults?
 
I'm not against providing the workaround, but I have another question.
You called it "known-for-many-years", so how long should we provide
this workaround?
 
Subject: Re: ruby 1.9 & 2.1 susceptible to the CRIME attack and uses weak cipher suites
From: Jeff Hodges <jeff@somethingsimilar.com>
To: Nobuyoshi Nakada <nobu@ruby-lang.org>
Cc: =?UTF-8?Q?Martin_Bo=C3=9Flet?= <martin.bosslet@gmail.com>, security <security@ruby-lang.org>
Date: Sun, 12 Jan 2014 23:30:04 -0800
 
This is not a workaround. Ruby will, for the forseeable future, have to
ship with it's own defaults and own them because OpenSSL installations on
its users' machines may have insecure defaults. This is normal, especially
for a project of Ruby's popularity.
 
 
On Sun, Jan 12, 2014 at 11:22 PM, Nobuyoshi Nakada <nobu@ruby-lang.org>wrote:
 
> (2014/01/13 15:35), Jeff Hodges wrote:
> > I have tickets going to improve the OpenSSL defaults. Remember, OpenSSL
> is
> > under FIPS compliance rules and it's release process is very, very slow.
>
> OK, I think I understand now.
> You say we should make "short-term" workaround for OpenSSL instead of
> OpenSSL, correct?
>
> > The conversation so far has been about OpenSSL, and we've not discussed
> > what Ruby is going to do.
>
> Because it's an issue of OpenSSL essentially, not Ruby.
>
> > So, what is Ruby going to do for its defaults?
>
> I'm not against providing the workaround, but I have another question.
> You called it "known-for-many-years", so how long should we provide
> this workaround?
>
 
Subject: Re: ruby 1.9 & 2.1 susceptible to the CRIME attack and uses weak cipher suites
From: Yusuke Endoh <mame@tsg.ne.jp>
To: Nobuyoshi Nakada <nobu@ruby-lang.org>
Cc: Jeff Hodges <jeff@somethingsimilar.com>, security <security@ruby-lang.org>, =?ISO-8859-1?Q?Martin_Bo=DFlet?= <martin.bosslet@gmail.com>
Date: Mon, 13 Jan 2014 16:34:31 +0900
 
2014/1/13 Nobuyoshi Nakada <nobu@ruby-lang.org>:
> (1) OpenSSL already has deprecated and disabled that option by default,
 
In the recent OpenSSL, I think so.
 
> (2) but Ruby's openssl ext enables it?
 
No, it does not do so. It just uses the OpenSSL's default settings.
 
What Jeff is saying is that we should use our own default settings
rather than OpenSSL's default. I don't think it is practical, though.
 
 
Note that Net::HTTP provides a user-level workaround already.
 
http.ciphers = "DEFAULT:!aNULL:!eNULL:!LOW:!EXPORT:!SSLv2"
 
will stop the dangerous ciphers, I think.
 
--
Yusuke Endoh <mame@tsg.ne.jp>
 
Subject: Re: ruby 1.9 & 2.1 susceptible to the CRIME attack and uses weak cipher suites
From: Dirkjan Bussink <d.bussink@gmail.com>
To: Jeff Hodges <jeff@somethingsimilar.com>
Cc: security <security@ruby-lang.org>
Date: Mon, 13 Jan 2014 08:35:16 +0100
 
 
On 13 Jan 2014, at 08:30, Jeff Hodges <jeff@somethingsimilar.com> wrote:
 
> This is not a workaround. Ruby will, for the forseeable future, have
to ship with it's own defaults and own them because OpenSSL
installations on its users' machines may have insecure defaults. This is
normal, especially for a project of Ruby's popularity.
 
Strongly agree with Jeff here. It might be idealistically preferred to
have OpenSSL fix their defaults, but actually getting those changes to
end users is going to take years.
 
Not only will it take a long time for a change to be made in OpenSSL, it
will take even longer for those changes to reach end users due to
package upgrades. OpenSSL is updated far less frequently than Ruby, so
fixing this in Ruby seems to me like a far better solution.
 
We should consider here the best interest for Ruby users, which is
trying to keep them safe and provide the best secure defaults we can,
regardless of what OpenSSL is doing and how long that is going to take.
 
—
Regards,
 
Dirkjan Bussink
 
Subject: Re: ruby 1.9 & 2.1 susceptible to the CRIME attack and uses weak cipher suites
From: Nobuyoshi Nakada <nobu@ruby-lang.org>
To: Yusuke Endoh <mame@tsg.ne.jp>
Cc: Jeff Hodges <jeff@somethingsimilar.com>, security <security@ruby-lang.org>, =?ISO-8859-1?Q?Martin_Bo=DFlet?= <martin.bosslet@gmail.com>
Date: Mon, 13 Jan 2014 18:06:56 +0900
 
(2014/01/13 16:34), Yusuke Endoh wrote:
> Note that Net::HTTP provides a user-level workaround already.
>
> http.ciphers = "DEFAULT:!aNULL:!eNULL:!LOW:!EXPORT:!SSLv2"
>
> will stop the dangerous ciphers, I think.
 
Thank you, then this is a patch for this workaround?
 
diff --git a/ext/openssl/lib/openssl/ssl.rb b/ext/openssl/lib/openssl/ssl.rb
index 014e113..2d4c14d 100644
--- a/ext/openssl/lib/openssl/ssl.rb
+++ b/ext/openssl/lib/openssl/ssl.rb
@@ -20,13 +20,18 @@ require "fcntl"
module OpenSSL
module SSL
class SSLContext
+ options = OpenSSL::SSL::OP_ALL
+ if defined?(OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS)
+ options &= ~OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS
+ end
+ if defined?(OpenSSL::SSL::OP_NO_COMPRESSION)
+ options |= OpenSSL::SSL::OP_NO_COMPRESSION
+ end
DEFAULT_PARAMS = {
:ssl_version => "SSLv23",
:verify_mode => OpenSSL::SSL::VERIFY_PEER,
- :ciphers => "ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW",
- :options => defined?(OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS) ?
- OpenSSL::SSL::OP_ALL & ~OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS :
- OpenSSL::SSL::OP_ALL,
+ :ciphers => "DEFAULT:!aNULL:!eNULL:!LOW:!EXPORT:!SSLv2",
+ :options => options,
}
DEFAULT_CERT_STORE = OpenSSL::X509::Store.new
 
Subject: Re: ruby 1.9 & 2.1 susceptible to the CRIME attack and uses weak cipher suites
From: Jeff Hodges <jeff@somethingsimilar.com>
To: Nobuyoshi Nakada <nobu@ruby-lang.org>
Cc: Yusuke Endoh <mame@tsg.ne.jp>, security <security@ruby-lang.org>, =?UTF-8?Q?Martin_Bo=C3=9Flet?= <martin.bosslet@gmail.com>
Date: Mon, 13 Jan 2014 10:47:23 -0800
 
Yep, this changes gets its a Probably Okay.
 
This patch also explains why folks didn't see ruby having it's own defaults
in the C code.
 
One weird thing, though, this config claims that Ruby will try to support
SSLv2 first. Is that correct? (I ask because SSLv2 is very broken.)
 
 
On Mon, Jan 13, 2014 at 1:06 AM, Nobuyoshi Nakada <nobu@ruby-lang.org>wrote:
 
> (2014/01/13 16:34), Yusuke Endoh wrote:
> > Note that Net::HTTP provides a user-level workaround already.
> >
> > http.ciphers = "DEFAULT:!aNULL:!eNULL:!LOW:!EXPORT:!SSLv2"
> >
> > will stop the dangerous ciphers, I think.
>
> Thank you, then this is a patch for this workaround?
>
>
> diff --git a/ext/openssl/lib/openssl/ssl.rb
> b/ext/openssl/lib/openssl/ssl.rb
> index 014e113..2d4c14d 100644
> --- a/ext/openssl/lib/openssl/ssl.rb
> +++ b/ext/openssl/lib/openssl/ssl.rb
> @@ -20,13 +20,18 @@ require "fcntl"
> module OpenSSL
> module SSL
> class SSLContext
> + options = OpenSSL::SSL::OP_ALL
> + if defined?(OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS)
> + options &= ~OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS
> + end
> + if defined?(OpenSSL::SSL::OP_NO_COMPRESSION)
> + options |= OpenSSL::SSL::OP_NO_COMPRESSION
> + end
> DEFAULT_PARAMS = {
> :ssl_version => "SSLv23",
> :verify_mode => OpenSSL::SSL::VERIFY_PEER,
> - :ciphers => "ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW",
> - :options =>
> defined?(OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS) ?
> - OpenSSL::SSL::OP_ALL &
> ~OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS :
> - OpenSSL::SSL::OP_ALL,
> + :ciphers => "DEFAULT:!aNULL:!eNULL:!LOW:!EXPORT:!SSLv2",
> + :options => options,
> }
>
> DEFAULT_CERT_STORE = OpenSSL::X509::Store.new
>
 
Subject: Re: ruby 1.9 & 2.1 susceptible to the CRIME attack and uses weak cipher suites
From: Yusuke Endoh <mame@tsg.ne.jp>
To: Jeff Hodges <jeff@somethingsimilar.com>
Cc: Nobuyoshi Nakada <nobu@ruby-lang.org>, security <security@ruby-lang.org>, =?ISO-8859-1?Q?Martin_Bo=DFlet?= <martin.bosslet@gmail.com>
Date: Tue, 14 Jan 2014 23:04:02 +0900
 
> This patch also explains why folks didn't see ruby having it's own defaults
> in the C code.
 
Sorry ;-) But I think this issue suggests precisely the disadvantage
of having the own defaults. It is too hard to maintain.
 
Anyway, we cannot remove the defaults now for the compatibility. I
agree with the patch. Emboss, what do you think?
 
 
2014/1/14 Jeff Hodges <jeff@somethingsimilar.com>:
> Yep, this changes gets its a Probably Okay.
>
> This patch also explains why folks didn't see ruby having it's own defaults
> in the C code.
>
> One weird thing, though, this config claims that Ruby will try to support
> SSLv2 first. Is that correct? (I ask because SSLv2 is very broken.)
>
>
> On Mon, Jan 13, 2014 at 1:06 AM, Nobuyoshi Nakada <nobu@ruby-lang.org>
> wrote:
>>
>> (2014/01/13 16:34), Yusuke Endoh wrote:
>> > Note that Net::HTTP provides a user-level workaround already.
>> >
>> > http.ciphers = "DEFAULT:!aNULL:!eNULL:!LOW:!EXPORT:!SSLv2"
>> >
>> > will stop the dangerous ciphers, I think.
>>
>> Thank you, then this is a patch for this workaround?
>>
>>
>> diff --git a/ext/openssl/lib/openssl/ssl.rb
>> b/ext/openssl/lib/openssl/ssl.rb
>> index 014e113..2d4c14d 100644
>> --- a/ext/openssl/lib/openssl/ssl.rb
>> +++ b/ext/openssl/lib/openssl/ssl.rb
>> @@ -20,13 +20,18 @@ require "fcntl"
>> module OpenSSL
>> module SSL
>> class SSLContext
>> + options = OpenSSL::SSL::OP_ALL
>> + if defined?(OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS)
>> + options &= ~OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS
>> + end
>> + if defined?(OpenSSL::SSL::OP_NO_COMPRESSION)
>> + options |= OpenSSL::SSL::OP_NO_COMPRESSION
>> + end
>> DEFAULT_PARAMS = {
>> :ssl_version => "SSLv23",
>> :verify_mode => OpenSSL::SSL::VERIFY_PEER,
>> - :ciphers => "ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW",
>> - :options =>
>> defined?(OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS) ?
>> - OpenSSL::SSL::OP_ALL &
>> ~OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS :
>> - OpenSSL::SSL::OP_ALL,
>> + :ciphers => "DEFAULT:!aNULL:!eNULL:!LOW:!EXPORT:!SSLv2",
>> + :options => options,
>> }
>>
>> DEFAULT_CERT_STORE = OpenSSL::X509::Store.new
>
>
 
 
 
--
Yusuke Endoh <mame@tsg.ne.jp>
 
Subject: Re: ruby 1.9 & 2.1 susceptible to the CRIME attack and uses weak cipher suites
From: Jeff Hodges <jeff@somethingsimilar.com>
To: Yusuke Endoh <mame@tsg.ne.jp>
Cc: Nobuyoshi Nakada <nobu@ruby-lang.org>, security <security@ruby-lang.org>, =?UTF-8?Q?Martin_Bo=C3=9Flet?= <martin.bosslet@gmail.com>
Date: Tue, 14 Jan 2014 19:30:18 -0800
 
We will also want to add !SEED:!IDEA there.
 
So, what's the next steps for the patch?
 
 
On Tue, Jan 14, 2014 at 6:04 AM, Yusuke Endoh <mame@tsg.ne.jp> wrote:
 
> > This patch also explains why folks didn't see ruby having it's own
> defaults
> > in the C code.
>
> Sorry ;-) But I think this issue suggests precisely the disadvantage
> of having the own defaults. It is too hard to maintain.
>
> Anyway, we cannot remove the defaults now for the compatibility. I
> agree with the patch. Emboss, what do you think?
>
>
> 2014/1/14 Jeff Hodges <jeff@somethingsimilar.com>:
> > Yep, this changes gets its a Probably Okay.
> >
> > This patch also explains why folks didn't see ruby having it's own
> defaults
> > in the C code.
> >
> > One weird thing, though, this config claims that Ruby will try to support
> > SSLv2 first. Is that correct? (I ask because SSLv2 is very broken.)
> >
> >
> > On Mon, Jan 13, 2014 at 1:06 AM, Nobuyoshi Nakada <nobu@ruby-lang.org>
> > wrote:
> >>
> >> (2014/01/13 16:34), Yusuke Endoh wrote:
> >> > Note that Net::HTTP provides a user-level workaround already.
> >> >
> >> > http.ciphers = "DEFAULT:!aNULL:!eNULL:!LOW:!EXPORT:!SSLv2"
> >> >
> >> > will stop the dangerous ciphers, I think.
> >>
> >> Thank you, then this is a patch for this workaround?
> >>
> >>
> >> diff --git a/ext/openssl/lib/openssl/ssl.rb
> >> b/ext/openssl/lib/openssl/ssl.rb
> >> index 014e113..2d4c14d 100644
> >> --- a/ext/openssl/lib/openssl/ssl.rb
> >> +++ b/ext/openssl/lib/openssl/ssl.rb
> >> @@ -20,13 +20,18 @@ require "fcntl"
> >> module OpenSSL
> >> module SSL
> >> class SSLContext
> >> + options = OpenSSL::SSL::OP_ALL
> >> + if defined?(OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS)
> >> + options &= ~OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS
> >> + end
> >> + if defined?(OpenSSL::SSL::OP_NO_COMPRESSION)
> >> + options |= OpenSSL::SSL::OP_NO_COMPRESSION
> >> + end
> >> DEFAULT_PARAMS = {
> >> :ssl_version => "SSLv23",
> >> :verify_mode => OpenSSL::SSL::VERIFY_PEER,
> >> - :ciphers =>
> "ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW",
> >> - :options =>
> >> defined?(OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS) ?
> >> - OpenSSL::SSL::OP_ALL &
> >> ~OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS :
> >> - OpenSSL::SSL::OP_ALL,
> >> + :ciphers => "DEFAULT:!aNULL:!eNULL:!LOW:!EXPORT:!SSLv2",
> >> + :options => options,
> >> }
> >>
> >> DEFAULT_CERT_STORE = OpenSSL::X509::Store.new
> >
> >
>
>
>
> --
> Yusuke Endoh <mame@tsg.ne.jp>
>
 
Subject: Re: ruby 1.9 & 2.1 susceptible to the CRIME attack and uses weak cipher suites
From: =?ISO-8859-1?Q?Martin_Bo=DFlet?= <martin.bosslet@gmail.com>
To: Yusuke Endoh <mame@tsg.ne.jp>
Cc: Jeff Hodges <jeff@somethingsimilar.com>, Nobuyoshi Nakada <nobu@ruby-lang.org>, security <security@ruby-lang.org>
Date: Wed, 15 Jan 2014 08:34:57 +0100
 
2014/1/14 Yusuke Endoh <mame@tsg.ne.jp>
 
> > This patch also explains why folks didn't see ruby having it's own
> defaults
> > in the C code.
>
> Sorry ;-) But I think this issue suggests precisely the disadvantage
> of having the own defaults. It is too hard to maintain.
>
> Anyway, we cannot remove the defaults now for the compatibility. I
> agree with the patch. Emboss, what do you think?
>
 
Personally, I would also prefer if upstream could fix this, if not only for
the sake of DRY.
 
@Jeff: Have you heard anything from the OpenSSL devs, are they willing to
change their defaults?
 
If they are not, I understand the arguments for patching this in Ruby
OpenSSL itself. The reason for my concerns is that patching in return means
we'll have to monitor OpenSSL (C library) defaults very closely in the
future. We must adopt any future changes and we must react if they should
change defaults internally altogether. If we miss one of those changes and
a vulnerability evolves from this everybody will point fingers at us for
not sticking to the library defaults.
 
@Jeff: With the addition of !SEED:!IDEA, you would agree to the patch?
 
I think it would be a good idea to document each setting, its purpose and
intentions along with the patch. I'd volunteer to do that.
 
So is everybody for patching this in Ruby OpenSSL? What if OpenSSL devs
decide to patch it on their end, should we still patch it ourselves?
 
-Martin
 
Subject: Re: ruby 1.9 & 2.1 susceptible to the CRIME attack and uses weak cipher suites
From: Jeff Hodges <jeff@somethingsimilar.com>
To: =?UTF-8?Q?Martin_Bo=C3=9Flet?= <martin.bosslet@gmail.com>
Cc: Yusuke Endoh <mame@tsg.ne.jp>, Nobuyoshi Nakada <nobu@ruby-lang.org>, security <security@ruby-lang.org>
Date: Tue, 14 Jan 2014 23:56:56 -0800
 
I am okay with this patch if Ruby is not using the SSLv2 client hello
format as it seems to be in the configuration. If ruby is using the sslv2
handshake, it needs to be should be bumped up. SSLv2 was broken back in the
90s and this makes users susceptible to downgrade attacks.
 
Yes, the Ruby developers will have to own this configuration change going
forward. Per earlier discussion, it doesn't matter if OpenSSL changes their
defaults or not, Ruby will have users with insecure OpenSSL libraries
installed. There will always be configurations that OpenSSL or any other
library Ruby needs that will have defaults that will not be safe in Ruby's
security environment and the libraries will have legitimate reasons for
that.
 
The Ruby developers already should be monitoring for new SSL/TLS attacks
and adjusting to them. Ruby is a popular runtime and its security is the
security of its users. Ruby can't rely on them to have the latest of
everything installed. Look at OS X. The default version of OpenSSL is still
0.9.8 and few ever update it. Users don't even *know* to update it.
 
Punting problems to the users means that more people have to aware and fix
every single possible issue instead of Ruby providing a safe environment
for them to work in. And those people simply won't do it, either out of
laziness, or ignorance. The Ruby developers are a much better position to
take care of their users.
 
I note that other runtimes don't have problems owning their security. For
instance, the CRIME attack was well-known and fixed by Java, Go, all of the
major browsers and many others when it was discovered in 2011. The fact
that it was not fixed in Ruby (whether or not they had the latest OpenSSL)
at the same time is a problem with Ruby. Ruby is the unusual one.
 
I'm very surprised to be having this debate on this email list.
 
 
 
On Tue, Jan 14, 2014 at 11:34 PM, Martin Boßlet <martin.bosslet@gmail.com>wrote:
 
>
>
>
> 2014/1/14 Yusuke Endoh <mame@tsg.ne.jp>
>
>> > This patch also explains why folks didn't see ruby having it's own
>> defaults
>> > in the C code.
>>
>> Sorry ;-) But I think this issue suggests precisely the disadvantage
>> of having the own defaults. It is too hard to maintain.
>>
>> Anyway, we cannot remove the defaults now for the compatibility. I
>> agree with the patch. Emboss, what do you think?
>>
>
> Personally, I would also prefer if upstream could fix this, if not only
> for the sake of DRY.
>
> @Jeff: Have you heard anything from the OpenSSL devs, are they willing to
> change their defaults?
>
> If they are not, I understand the arguments for patching this in Ruby
> OpenSSL itself. The reason for my concerns is that patching in return means
> we'll have to monitor OpenSSL (C library) defaults very closely in the
> future. We must adopt any future changes and we must react if they should
> change defaults internally altogether. If we miss one of those changes and
> a vulnerability evolves from this everybody will point fingers at us for
> not sticking to the library defaults.
>
> @Jeff: With the addition of !SEED:!IDEA, you would agree to the patch?
>
> I think it would be a good idea to document each setting, its purpose and
> intentions along with the patch. I'd volunteer to do that.
>
> So is everybody for patching this in Ruby OpenSSL? What if OpenSSL devs
> decide to patch it on their end, should we still patch it ourselves?
>
> -Martin
>
 
Subject: Re: ruby 1.9 & 2.1 susceptible to the CRIME attack and uses weak cipher suites
From: Yusuke Endoh <mame@tsg.ne.jp>
To: Jeff Hodges <jeff@somethingsimilar.com>
Cc: =?ISO-8859-1?Q?Martin_Bo=DFlet?= <martin.bosslet@gmail.com>, Nobuyoshi Nakada <nobu@ruby-lang.org>, security <security@ruby-lang.org>
Date: Thu, 16 Jan 2014 12:36:13 +0900
 
Jeff,
 
Could you please answer Martin's first question?
 
> @Jeff: Have you heard anything from the OpenSSL devs, are they willing to
change their defaults?
 
2014/1/15 Jeff Hodges <jeff@somethingsimilar.com>:
> I am okay with this patch if Ruby is not using the SSLv2 client hello for
mat
> as it seems to be in the configuration. If ruby is using the sslv2
> handshake, it needs to be should be bumped up. SSLv2 was broken back in t
he
> 90s and this makes users susceptible to downgrade attacks.
>
> Yes, the Ruby developers will have to own this configuration change going
> forward. Per earlier discussion, it doesn't matter if OpenSSL changes the
ir
> defaults or not, Ruby will have users with insecure OpenSSL libraries
> installed. There will always be configurations that OpenSSL or any other
> library Ruby needs that will have defaults that will not be safe in Ruby'
s
> security environment and the libraries will have legitimate reasons for
> that.
>
> The Ruby developers already should be monitoring for new SSL/TLS attacks
and
> adjusting to them. Ruby is a popular runtime and its security is the
> security of its users. Ruby can't rely on them to have the latest of
> everything installed. Look at OS X. The default version of OpenSSL is sti
ll
> 0.9.8 and few ever update it. Users don't even *know* to update it.
>
> Punting problems to the users means that more people have to aware and fi
x
> every single possible issue instead of Ruby providing a safe environment
for
> them to work in. And those people simply won't do it, either out of
> laziness, or ignorance. The Ruby developers are a much better position to
> take care of their users.
>
> I note that other runtimes don't have problems owning their security. For
> instance, the CRIME attack was well-known and fixed by Java, Go, all of t
he
> major browsers and many others when it was discovered in 2011. The fact t
hat
> it was not fixed in Ruby (whether or not they had the latest OpenSSL) at
the
> same time is a problem with Ruby. Ruby is the unusual one.
>
> I'm very surprised to be having this debate on this email list.
>
>
>
> On Tue, Jan 14, 2014 at 11:34 PM, Martin Bofllet <martin.bosslet@gmail.c
om>
> wrote:
>>
>>
>>
>>
>> 2014/1/14 Yusuke Endoh <mame@tsg.ne.jp>
>>>
>>> > This patch also explains why folks didn't see ruby having it's own
>>> > defaults
>>> > in the C code.
>>>
>>> Sorry ;-) But I think this issue suggests precisely the disadvantage
>>> of having the own defaults. It is too hard to maintain.
>>>
>>> Anyway, we cannot remove the defaults now for the compatibility. I
>>> agree with the patch. Emboss, what do you think?
>>
>>
>> Personally, I would also prefer if upstream could fix this, if not only
>> for the sake of DRY.
>>
>> @Jeff: Have you heard anything from the OpenSSL devs, are they willing t
o
>> change their defaults?
>>
>> If they are not, I understand the arguments for patching this in Ruby
>> OpenSSL itself. The reason for my concerns is that patching in return me
ans
>> we'll have to monitor OpenSSL (C library) defaults very closely in the
>> future. We must adopt any future changes and we must react if they shoul
d
>> change defaults internally altogether. If we miss one of those changes a
nd a
>> vulnerability evolves from this everybody will point fingers at us for n
ot
>> sticking to the library defaults.
>>
>> @Jeff: With the addition of !SEED:!IDEA, you would agree to the patch?
>>
>> I think it would be a good idea to document each setting, its purpose an
d
>> intentions along with the patch. I'd volunteer to do that.
>>
>> So is everybody for patching this in Ruby OpenSSL? What if OpenSSL devs
>> decide to patch it on their end, should we still patch it ourselves?
>>
>> -Martin
>
>
 
 
 
--
Yusuke Endoh <mame@tsg.ne.jp>
 
Subject: Re: ruby 1.9 & 2.1 susceptible to the CRIME attack and uses weak cipher suites
From: Jeff Hodges <jeff@somethingsimilar.com>
To: Yusuke Endoh <mame@tsg.ne.jp>
Cc: =?UTF-8?Q?Martin_Bo=C3=9Flet?= <martin.bosslet@gmail.com>, Nobuyoshi Nakada <nobu@ruby-lang.org>, security <security@ruby-lang.org>
Date: Wed, 15 Jan 2014 19:45:09 -0800
 
Yes, one has, but they've not moved beyond that. Again, that doesn't matter.
 
 
On Wed, Jan 15, 2014 at 7:36 PM, Yusuke Endoh <mame@tsg.ne.jp> wrote:
 
> Jeff,
>
> Could you please answer Martin's first question?
>
> > @Jeff: Have you heard anything from the OpenSSL devs, are they willing
> to change their defaults?
>
> 2014/1/15 Jeff Hodges <jeff@somethingsimilar.com>:
> > I am okay with this patch if Ruby is not using the SSLv2 client hello
> format
> > as it seems to be in the configuration. If ruby is using the sslv2
> > handshake, it needs to be should be bumped up. SSLv2 was broken back in
> the
> > 90s and this makes users susceptible to downgrade attacks.
> >
> > Yes, the Ruby developers will have to own this configuration change going
> > forward. Per earlier discussion, it doesn't matter if OpenSSL changes
> their
> > defaults or not, Ruby will have users with insecure OpenSSL libraries
> > installed. There will always be configurations that OpenSSL or any other
> > library Ruby needs that will have defaults that will not be safe in
> Ruby's
> > security environment and the libraries will have legitimate reasons for
> > that.
> >
> > The Ruby developers already should be monitoring for new SSL/TLS attacks
> and
> > adjusting to them. Ruby is a popular runtime and its security is the
> > security of its users. Ruby can't rely on them to have the latest of
> > everything installed. Look at OS X. The default version of OpenSSL is
> still
> > 0.9.8 and few ever update it. Users don't even *know* to update it.
> >
> > Punting problems to the users means that more people have to aware and
> fix
> > every single possible issue instead of Ruby providing a safe environment
> for
> > them to work in. And those people simply won't do it, either out of
> > laziness, or ignorance. The Ruby developers are a much better position to
> > take care of their users.
> >
> > I note that other runtimes don't have problems owning their security. For
> > instance, the CRIME attack was well-known and fixed by Java, Go, all of
> the
> > major browsers and many others when it was discovered in 2011. The fact
> that
> > it was not fixed in Ruby (whether or not they had the latest OpenSSL) at
> the
> > same time is a problem with Ruby. Ruby is the unusual one.
> >
> > I'm very surprised to be having this debate on this email list.
> >
> >
> >
> > On Tue, Jan 14, 2014 at 11:34 PM, Martin Boßlet <
> martin.bosslet@gmail.com>
> > wrote:
> >>
> >>
> >>
> >>
> >> 2014/1/14 Yusuke Endoh <mame@tsg.ne.jp>
> >>>
> >>> > This patch also explains why folks didn't see ruby having it's own
> >>> > defaults
> >>> > in the C code.
> >>>
> >>> Sorry ;-) But I think this issue suggests precisely the disadvantage
> >>> of having the own defaults. It is too hard to maintain.
> >>>
> >>> Anyway, we cannot remove the defaults now for the compatibility. I
> >>> agree with the patch. Emboss, what do you think?
> >>
> >>
> >> Personally, I would also prefer if upstream could fix this, if not only
> >> for the sake of DRY.
> >>
> >> @Jeff: Have you heard anything from the OpenSSL devs, are they willing
> to
> >> change their defaults?
> >>
> >> If they are not, I understand the arguments for patching this in Ruby
> >> OpenSSL itself. The reason for my concerns is that patching in return
> means
> >> we'll have to monitor OpenSSL (C library) defaults very closely in the
> >> future. We must adopt any future changes and we must react if they
> should
> >> change defaults internally altogether. If we miss one of those changes
> and a
> >> vulnerability evolves from this everybody will point fingers at us for
> not
> >> sticking to the library defaults.
> >>
> >> @Jeff: With the addition of !SEED:!IDEA, you would agree to the patch?
> >>
> >> I think it would be a good idea to document each setting, its purpose
> and
> >> intentions along with the patch. I'd volunteer to do that.
> >>
> >> So is everybody for patching this in Ruby OpenSSL? What if OpenSSL devs
> >> decide to patch it on their end, should we still patch it ourselves?
> >>
> >> -Martin
> >
> >
>
>
>
> --
> Yusuke Endoh <mame@tsg.ne.jp>
>
 
Subject: Re: ruby 1.9 & 2.1 susceptible to the CRIME attack and uses weak cipher suites
From: Jeff Hodges <jeff@somethingsimilar.com>
To: Yusuke Endoh <mame@tsg.ne.jp>
Cc: =?UTF-8?Q?Martin_Bo=C3=9Flet?= <martin.bosslet@gmail.com>, Nobuyoshi Nakada <nobu@ruby-lang.org>, security <security@ruby-lang.org>
Date: Wed, 15 Jan 2014 19:53:08 -0800
 
http://rt.openssl.org/Ticket/Display.html?id=3231
 
 
On Wed, Jan 15, 2014 at 7:45 PM, Jeff Hodges <jeff@somethingsimilar.com>wrote:
 
> Yes, one has, but they've not moved beyond that. Again, that doesn't
> matter.
>
>
>>
>>
>> --
>> Yusuke Endoh <mame@tsg.ne.jp>
>>
>
>
 
Subject: Re: ruby 1.9 & 2.1 susceptible to the CRIME attack and uses weak cipher suites
From: Yusuke Endoh <mame@tsg.ne.jp>
To: Jeff Hodges <jeff@somethingsimilar.com>
Cc: =?ISO-8859-1?Q?Martin_Bo=DFlet?= <martin.bosslet@gmail.com>, Nobuyoshi Nakada <nobu@ruby-lang.org>, security <security@ruby-lang.org>
Date: Thu, 16 Jan 2014 23:27:24 +0900
 
> Yes, one has, but they've not moved beyond that. Again, that doesn't matter.
 
Thank you. I think it actually matters because, IMO, they are our
authority about all decisions related to Ruby OpenSSL.
 
Ruby is a voluntary project. Ruby is not a project for security.
There are few developers who are familiar with SSL/TLS details.
Martin is a notable exception and thus he is the current maintainer of
Ruby OpenSSL, but note that he is not even the original author. It is
important that he is reluctant to maintain our own security policy.
Even if he were willing to do so, I would be negative since it looks
too hard and rather dangerous for only one person to determine such a
sensitive thing.
In this case, we must delegate the task to other people. I believe it
would be much better than using our dogmatic policy irresponsibly.
The best authority of that decision is definitely the OpenSSL project
itself. In the sense, its action are very important for us.
 
 
> Look at OS X. The default version of OpenSSL is still 0.9.8 and few ever update it.
 
In general, it is a bad idea for Ruby to work around any issue of OS.
OS X is a commercial project. Why don't you negotiate Apple?
 
 
> The Ruby developers are a much better position to take care of their users.
 
I can understand this point, but I don't think we can afford it enough.
 
 
That being said, the current Ruby OpenSSL actually has the own
defaults. It is very unfortunate, we cannot remove it right now for
the compatibility reason. So I agreed with nobu's patch as a
temporary measure. But, IMO, the code should be removed in the
future.
 
 
Thank you,
 
--
Yusuke Endoh <mame@tsg.ne.jp>
 
Subject: Re: ruby 1.9 & 2.1 susceptible to the CRIME attack and uses weak cipher suites
From: Charlie Somerville <charliesome@ruby-lang.org>
To: Yusuke Endoh <mame@tsg.ne.jp>
Cc: Jeff Hodges <jeff@somethingsimilar.com>, security <security@ruby-lang.org>, =?utf-8?Q?Martin_Bo=C3=9Flet?= <martin.bosslet@gmail.com>
Date: Fri, 17 Jan 2014 01:47:02 +1100
 
On Friday, 17 January 2014 at 1:27 am, Yusuke Endoh wrote:
> There are few developers who are familiar with SSL/TLS details.
 
This is true, and this is why IMO it is so important that Ruby provides secure defaults.
 
 
Subject: Re: ruby 1.9 & 2.1 susceptible to the CRIME attack and uses weak cipher suites
From: Dirkjan Bussink <d.bussink@gmail.com>
To: Jeff Hodges <jeff@somethingsimilar.com>, security <security@ruby-lang.org>, =?windows-1252?Q?Martin_Bo=DFlet?= <martin.bosslet@gmail.com>
Date: Thu, 16 Jan 2014 15:57:18 +0100
 
 
On 16 Jan 2014, at 15:27, Yusuke Endoh <mame@tsg.ne.jp> wrote:
 
> Thank you. I think it actually matters because, IMO, they are our
> authority about all decisions related to Ruby OpenSSL.
 
Sadly the track record here of upstream OpenSSL of providing good
defaults isn’t good. The current defaults are not safe and haven’t
been safe for a very long time. I don’t see this changing, so I don’t
think considering them an authority on this.
 
> Ruby is a voluntary project. Ruby is not a project for security.
> There are few developers who are familiar with SSL/TLS details.
> Martin is a notable exception and thus he is the current maintainer of
> Ruby OpenSSL, but note that he is not even the original author. It is
> important that he is reluctant to maintain our own security policy.
> Even if he were willing to do so, I would be negative since it looks
> too hard and rather dangerous for only one person to determine such a
> sensitive thing.
 
I’m more than willing to help out where I can here. I’ve done some
stuff on SSL deployment etc. I don’t consider myself an big expert in
this area, but I believe to know at least enough to help out making
decisions on a topic like this. I’ve worked on the deployment of SSL
at GitHub (https://github.com/blog/1734-improving-our-ssl-setup) and
Jeff has been so kind to also point us at improvements there.
 
Everyone is fallible here but I refuse to believe that as a Ruby
community we can’t do better than this. Jeff comes to us with this
problem and is knowledgable in the subject. Why not as him and others
like him for help on this? Why not have them review these lists?
 
Right now we are at a point where we definitely know not doing something
is irresponsible to our users, so we should improve it here. It’s more
a matter of taking this responsibility because throwing this back to
OpenSSL is seriously irresponsible imho.
 
>> The Ruby developers are a much better position to take care of their
users.
>
> I can understand this point, but I don't think we can afford it
enough.
 
I think here Ruby must. There are a lot of people who depend on Ruby for
all kinds of things these days and I feel this is a responsibility that
can’t be ignored. We can’t just throw up our hands in the air and
ignore this problem and hope it goes away.
 
—
Regards,
 
Dirkjan Bussink
 
Subject: Re: ruby 1.9 & 2.1 susceptible to the CRIME attack and uses weak cipher suites
From: Jeff Hodges <jeff@somethingsimilar.com>
To: Dirkjan Bussink <d.bussink@gmail.com>
Cc: security <security@ruby-lang.org>, =?UTF-8?Q?Martin_Bo=C3=9Flet?= <martin.bosslet@gmail.com>
Date: Thu, 16 Jan 2014 16:09:47 -0800
 
It's now been 4 days and 30 emails with no patch merged in and continuing
debate about the purpose of the proposed patch.
 
These issues expose Ruby users to attacks known for many years, and are
trivial to discover. The Ruby core developers on security@ currently do not
believe these issues are in the purview of Ruby nor urgent enough to have
their patches merged in.
 
I will make a public ticket on <bugs.ruby-lang.org> for this issue to be
tracked and announced. This will allow others to be made aware of the
issues and to correct their code. The time for private disclosure is over.

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.