Skip to content

Commit 72796c0

Browse files
authored
Merge pull request #7 from esp8266/2.7.4
2.7.4
2 parents 59bbfc7 + 2843a5a commit 72796c0

File tree

10 files changed

+35
-10
lines changed

10 files changed

+35
-10
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Arduino core for ESP8266 WiFi chip
33

44
# Quick links
55

6-
- [Latest release documentation](https://arduino-esp8266.readthedocs.io/en/2.7.3/)
6+
- [Latest release documentation](https://arduino-esp8266.readthedocs.io/en/2.7.4/)
77
- [Current "git version" documentation](https://arduino-esp8266.readthedocs.io/en/latest/)
88
- [Install git version](https://arduino-esp8266.readthedocs.io/en/latest/installing.html#using-git-version) ([sources](doc/installing.rst#using-git-version))
99

@@ -36,7 +36,7 @@ Starting with 1.6.4, Arduino allows installation of third-party platform package
3636
#### Latest release [![Latest release](https://img.shields.io/github/release/esp8266/Arduino.svg)](https://github.com/esp8266/Arduino/releases/latest/)
3737
Boards manager link: `https://arduino.esp8266.com/stable/package_esp8266com_index.json`
3838

39-
Documentation: [https://arduino-esp8266.readthedocs.io/en/2.7.3/](https://arduino-esp8266.readthedocs.io/en/2.7.3/)
39+
Documentation: [https://arduino-esp8266.readthedocs.io/en/2.7.4/](https://arduino-esp8266.readthedocs.io/en/2.7.4/)
4040

4141
### Using git version
4242
[![Linux build status](https://travis-ci.org/esp8266/Arduino.svg)](https://travis-ci.org/esp8266/Arduino)

cores/esp8266/Esp.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -697,15 +697,16 @@ static SpiFlashOpResult spi_flash_write_puya(uint32_t offset, uint32_t *data, si
697697
} else {
698698
bytesLeft = 0;
699699
}
700-
rc = spi_flash_read(pos, flash_write_puya_buf, bytesNow);
700+
size_t bytesAligned = (bytesNow + 3) & ~3;
701+
rc = spi_flash_read(pos, flash_write_puya_buf, bytesAligned);
701702
if (rc != SPI_FLASH_RESULT_OK) {
702703
return rc;
703704
}
704-
for (size_t i = 0; i < bytesNow / 4; ++i) {
705+
for (size_t i = 0; i < bytesAligned / 4; ++i) {
705706
flash_write_puya_buf[i] &= *ptr;
706707
++ptr;
707708
}
708-
rc = spi_flash_write(pos, flash_write_puya_buf, bytesNow);
709+
rc = spi_flash_write(pos, flash_write_puya_buf, bytesAligned);
709710
pos += bytesNow;
710711
}
711712
return rc;

cores/esp8266/Updater.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ UpdaterClass::UpdaterClass()
3535
, _startAddress(0)
3636
, _currentAddress(0)
3737
, _command(U_FLASH)
38+
, _ledPin(-1)
3839
, _hash(nullptr)
3940
, _verify(nullptr)
4041
, _progress_callback(nullptr)

cores/esp8266/heap.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ void ICACHE_RAM_ATTR print_loc(size_t size, const char* file, int line)
164164
if (inISR && (uint32_t)file >= 0x40200000) {
165165
DEBUG_HEAP_PRINTF("File: %p", file);
166166
} else if (!inISR && (uint32_t)file >= 0x40200000) {
167-
char buf[ets_strlen(file)] __attribute__ ((aligned(4)));
167+
char buf[ets_strlen(file) + 1] __attribute__((aligned(4)));
168168
ets_strcpy(buf, file);
169169
DEBUG_HEAP_PRINTF(buf);
170170
} else {

cores/esp8266/umm_malloc/umm_local.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ int ICACHE_FLASH_ATTR umm_info_safe_printf_P(const char *fmt, ...) {
206206
the PROGMEM address must be word (4 bytes) aligned. The destination
207207
address for ets_memcpy must also be word-aligned.
208208
*/
209-
char ram_buf[ets_strlen(fmt)] __attribute__ ((aligned(4)));
209+
char ram_buf[ets_strlen(fmt) + 1] __attribute__((aligned(4)));
210210
ets_strcpy(ram_buf, fmt);
211211
va_list argPtr;
212212
va_start(argPtr, fmt);

libraries/ESP8266WiFi/src/ESP8266WiFiGeneric.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,16 @@ void ESP8266WiFiGenericClass::_eventCallback(void* arg)
233233
WiFiClient::stopAll();
234234
}
235235

236+
if (event->event == EVENT_STAMODE_AUTHMODE_CHANGE) {
237+
auto& src = event->event_info.auth_change;
238+
if ((src.old_mode != AUTH_OPEN) && (src.new_mode == AUTH_OPEN)) {
239+
// CVE-2020-12638 workaround. When we get a change to AUTH_OPEN from any other mode, drop the WiFi link because it's a downgrade attack
240+
// TODO - When upgrading to 3.x.x with fix, remove this code
241+
DEBUG_WIFI("WIFI_EVENT_STAMODE_AUTHMODE_CHANGE from encrypted(%d) to AUTH_OPEN, potential downgrade attack. Reconnecting WiFi. See CVE-2020-12638 for more details\n", src.old_mode);
242+
WiFi.reconnect(); // Disconnects from STA and then reconnects
243+
}
244+
}
245+
236246
for(auto it = std::begin(sCbEventList); it != std::end(sCbEventList); ) {
237247
WiFiEventHandler &handler = *it;
238248
if (handler->canExpire() && handler.unique()) {

libraries/ESP8266WiFi/src/WiFiClientSecureBearSSL.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ WiFiClientSecure::WiFiClientSecure() : WiFiClient() {
105105
_clear();
106106
_clearAuthenticationSettings();
107107
_certStore = nullptr; // Don't want to remove cert store on a clear, should be long lived
108+
_sk = nullptr;
109+
_axtls_chain = nullptr;
110+
_axtls_sk = nullptr;
108111
stack_thunk_add_ref();
109112
}
110113

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"name": "framework-arduinoespressif8266",
33
"description": "Arduino Wiring-based Framework (ESP8266 Core)",
44
"url": "https://github.com/esp8266/Arduino",
5-
"version": "2.7.3"
5+
"version": "2.7.4"
66
}

package/build_boards_manager_package.sh

+10
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
#set -x
44

5+
if true; then
6+
7+
# hand made
8+
ver=2.7.4
9+
visiblever=${ver}
10+
plain_ver=${ver}
11+
12+
else
13+
514
ver=`git describe --tag`
615
visiblever=$ver
716
# match 0.0.*
@@ -29,6 +38,7 @@ else
2938
fi
3039
visiblever=$ver
3140
fi
41+
fi
3242

3343
set -e
3444

platform.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
# For more info:
66
# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5-3rd-party-Hardware-specification
77

8-
name=ESP8266 Boards (2.7.3)
9-
version=2.7.3
8+
name=ESP8266 Boards (2.7.4)
9+
version=2.7.4
1010

1111
# These will be removed by the packager script when doing a JSON release
1212
runtime.tools.xtensa-lx106-elf-gcc.path={runtime.platform.path}/tools/xtensa-lx106-elf

0 commit comments

Comments
 (0)