Philippe Teuwen
0a22929eac
Fix buffer overflow
...
Strangely only detected by Ubuntu 18.4 gcc 7.5.0
```
[-] CC src/cmdhflist.c
In file included from /usr/include/string.h:494:0,
from src/cmdhfict.c:21:
In function 'memcpy',
inlined from 'diversify_mifare_key' at src/cmdhfict.c:151:5,
inlined from 'derive_mifare_key' at src/cmdhfict.c:189:5,
inlined from 'CmdHfIctReader' at src/cmdhfict.c:199:12:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:34:10: error: '__builtin___memcpy_chk' writing 8 bytes into a region of size 6 overflows the destination [-Werror=stringop-overflow=]
return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'memcpy',
inlined from 'diversify_mifare_key' at src/cmdhfict.c:151:5,
inlined from 'derive_mifare_key' at src/cmdhfict.c:189:5,
inlined from 'CmdHfIctReader' at src/cmdhfict.c:203:12:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:34:10: error: '__builtin___memcpy_chk' writing 8 bytes into a region of size 6 overflows the destination [-Werror=stringop-overflow=]
return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
```c
uint8_t diverse[MIFARE_KEY_SIZE]; // = 6
diversify_mifare_key(uid, diverse);
```
```c
static int diversify_mifare_key(const uint8_t *uid, uint8_t *app_key) {
...
uint8_t output[8];
...
memcpy(app_key, output, sizeof(output));
```
2024-09-10 09:02:46 +02:00
Philippe Teuwen
a907e93d19
fix parrot dockerfile
2024-09-10 01:17:48 +02:00
Philippe Teuwen
cb473b6238
fix opensuse-leap docker
2024-09-10 01:16:55 +02:00
Philippe Teuwen
8cf66420af
add gd to all Dockerfiles due to changes in hf waveshare
2024-09-10 00:59:14 +02:00
Philippe Teuwen
fd1d088099
Fix Dockerfiles deprecation warning
2024-09-10 00:14:37 +02:00
Philippe Teuwen
13cad28d2a
fix experimental_client_with_swig cmake tests
2024-09-10 00:09:55 +02:00
Philippe Teuwen
b91f7742c1
fix experimental_lib/example_c/test_grab: no fork&pipe needed, use pm3_grabbed_output_get
2024-09-09 23:57:32 +02:00
Philippe Teuwen
1fa84f203d
fix hf_colin compilation error
2024-09-09 23:43:01 +02:00
Philippe Teuwen
ce650f472f
remove tabs
2024-09-09 23:04:39 +02:00
Iceman
a47ed1c7a7
Merge pull request #2493 from Antiklesys/master
...
Reverted changes to hf iclass dump due to buggy behavior
2024-09-09 21:01:14 +02:00
Antiklesys
1978c56f9d
Merge branch 'RfidResearchGroup:master' into master
2024-09-09 22:47:48 +08:00
Antiklesys
3253e2c288
Reverted buggy changes to hf iclass dump
...
Reverted code back to the original as it would "read" a card's AA1 without the correct keys.
2024-09-09 22:46:49 +08:00
Iceman
23f1089e4b
Merge pull request #2492 from Antiklesys/master
...
Fixed AA2 dump with Kc only
2024-09-09 12:59:33 +02:00
Antiklesys
c7c56c41b9
Update CHANGELOG.md
2024-09-09 18:10:13 +08:00
Antiklesys
8e961aaa04
Re-fixed indent
2024-09-09 18:01:02 +08:00
Antiklesys
96b1b6d72c
Fixed indent
...
Fixed indent
2024-09-09 17:58:47 +08:00
Antiklesys
041f6244cb
Fixed AA2 dump with Kc only
...
Fixed issue preventing iclass dump to dump AA2 only when only using Kc
2024-09-09 17:54:57 +08:00
Philippe Teuwen
157af8c31b
fm11rf08s script check python version
2024-09-08 15:16:23 +02:00
iceman1001
dd9bc4d363
the select param was handled wrong and it was tested for CRC which will not work. Thanks @RebornBrain for suggesting a fix
2024-09-08 14:25:40 +02:00
Philippe Teuwen
69d7a7e0c3
fm11rf08s: get advanced verification sector keys as well
2024-09-08 11:57:53 +02:00
Philippe Teuwen
846b273583
add fm1208-10 to hf 14a info
2024-09-08 09:58:30 +02:00
Philippe Teuwen
2dd1b90f4c
hf mf sim: adapt RATS condition to mimick real MFP 2k behavior
2024-09-07 11:10:31 +02:00
Philippe Teuwen
358130505a
hf mf sim: accept RATS no matter the value of PCD FSDI & CID
2024-09-07 11:01:58 +02:00
iceman1001
e50459b2c5
style
2024-09-06 22:59:23 +02:00
iceman1001
72900d1bf9
fix and style
2024-09-06 22:36:44 +02:00
Philippe Teuwen
715f149413
fm11rf08s script: optimize when default keys
2024-09-06 12:26:13 +02:00
iceman1001
ca0c662c22
bad char
2024-09-06 10:51:09 +02:00
iceman1001
b05ccae642
text, string formatter, and something still complains in the GH actions
2024-09-06 10:47:08 +02:00
iceman1001
0509755e3c
fix warning
2024-09-06 10:20:36 +02:00
iceman1001
abb8a72bb6
fixes
2024-09-06 10:13:19 +02:00
iceman1001
996429fa9e
fix some const params
2024-09-06 10:13:02 +02:00
iceman1001
7549f53b63
we use calloc
2024-09-06 10:07:06 +02:00
iceman1001
0b2081ff32
fix bad string formatters, we use calloc
2024-09-06 10:04:48 +02:00
iceman1001
d5015c8ba0
fix bad string formatters and pointer is always NULL no need to check
2024-09-06 10:01:32 +02:00
iceman1001
53c64858ef
fix wrong string formatters
2024-09-06 09:58:25 +02:00
iceman1001
b0dd246d94
const and bad OR
2024-09-06 09:52:30 +02:00
iceman1001
183b078969
text
2024-09-06 09:40:37 +02:00
iceman1001
713b6f80c4
fix consts
2024-09-06 09:35:30 +02:00
iceman1001
e7e836e33f
fix memleak
2024-09-06 09:33:40 +02:00
iceman1001
076bfb2ec5
fix consts
2024-09-06 09:31:07 +02:00
iceman1001
cfd218dd6f
fix bad return value
2024-09-06 09:22:38 +02:00
Iceman
b77099e195
Merge pull request #2490 from douniwan5788/fix_exit
...
fix: exit status
2024-09-06 08:53:46 +02:00
iceman1001
68693ae187
adapt test
2024-09-05 22:41:32 +02:00
iceman1001
686ee3138e
made a multi threaded version of ht2crack2search since the file lookups should benefit from it. In the friendly competition with @mwalker33 where I think his version beats mine
2024-09-05 22:29:55 +02:00
iceman1001
431a5d585e
fix one too small
2024-09-05 19:51:10 +02:00
iceman1001
7a4bd03cc0
added bounds checking for when the proxmark3 is simulating a ISO14443a tag
2024-09-05 18:38:17 +02:00
iceman1001
129d6f1e6d
a bit untested, I am sure all standalone modes fails now. lets see if this is enough of bounds checking
2024-09-05 17:59:34 +02:00
iceman1001
9c181dd83d
step one of bounds checking all responses when receiving ISO14443A frames... because @doegox find a missbehaving IC clone.....
2024-09-05 17:52:10 +02:00
Philippe Teuwen
46a8bea230
hf mf info: FM11RF32 detection
2024-09-05 15:32:52 +02:00
douniwan5788
9b879b0dc0
fix: exit status
2024-09-05 19:31:37 +08:00