Displaying 6 results from an estimated 6 matches for "lo_key_size".
2019 Nov 05
0
[klibc:master] losetup: Fix char signedness mismatches with <linux/loop.h>
...snprintf((char *)loopinfo64.lo_crypt_name, LO_NAME_SIZE,
"%s", encryption);
}
}
@@ -284,7 +284,7 @@ int set_loop(const char *device, const char *file, unsigned long long offset,
pass = xgetpass(pfd, "Password: ");
gotpass:
memset(loopinfo64.lo_encrypt_key, 0, LO_KEY_SIZE);
- xstrncpy(loopinfo64.lo_encrypt_key, pass, LO_KEY_SIZE);
+ xstrncpy((char *)loopinfo64.lo_encrypt_key, pass, LO_KEY_SIZE);
memset(pass, 0, strlen(pass));
loopinfo64.lo_encrypt_key_size = LO_KEY_SIZE;
}
2019 Oct 31
0
[PATCH 2/2] loop: switch to linux/loop.h
...LO_CRYPT_XOR 1
-#define LO_CRYPT_DES 2
-#define LO_CRYPT_CRYPTOAPI 18
-
-#define LOOP_SET_FD 0x4C00
-#define LOOP_CLR_FD 0x4C01
-#define LOOP_SET_STATUS 0x4C02
-#define LOOP_GET_STATUS 0x4C03
-#define LOOP_SET_STATUS64 0x4C04
-#define LOOP_GET_STATUS64 0x4C05
-
-#define LO_NAME_SIZE 64
-#define LO_KEY_SIZE 32
-
-struct loop_info {
- int lo_number;
- __kernel_old_dev_t lo_device;
- unsigned long lo_inode;
- __kernel_old_dev_t lo_rdevice;
- int lo_offset;
- int lo_encrypt_type;
- int lo_encrypt_key_size;
- int lo_flags;
- char lo_name[LO_NAME_SIZE];
- unsigned char lo_encrypt_key[LO_KEY_SIZE];...
2019 Nov 05
0
[klibc:master] loop: switch to linux/loop.h
...LO_CRYPT_XOR 1
-#define LO_CRYPT_DES 2
-#define LO_CRYPT_CRYPTOAPI 18
-
-#define LOOP_SET_FD 0x4C00
-#define LOOP_CLR_FD 0x4C01
-#define LOOP_SET_STATUS 0x4C02
-#define LOOP_GET_STATUS 0x4C03
-#define LOOP_SET_STATUS64 0x4C04
-#define LOOP_GET_STATUS64 0x4C05
-
-#define LO_NAME_SIZE 64
-#define LO_KEY_SIZE 32
-
-struct loop_info {
- int lo_number;
- dev_t lo_device;
- unsigned long lo_inode;
- dev_t lo_rdevice;
- int lo_offset;
- int lo_encrypt_type;
- int lo_encrypt_key_size;
- int lo_flags;
- char lo_name[LO_NAME_SIZE];
- unsigned char lo_encrypt_key[LO_KEY_SIZE];
- unsigned long lo_init[2]...
2010 Mar 14
0
[patches] klibc review unsorted patch queue
...LO_CRYPT_XOR 1
+#define LO_CRYPT_DES 2
+#define LO_CRYPT_CRYPTOAPI 18
+
+#define LOOP_SET_FD 0x4C00
+#define LOOP_CLR_FD 0x4C01
+#define LOOP_SET_STATUS 0x4C02
+#define LOOP_GET_STATUS 0x4C03
+#define LOOP_SET_STATUS64 0x4C04
+#define LOOP_GET_STATUS64 0x4C05
+
+#define LO_NAME_SIZE 64
+#define LO_KEY_SIZE 32
+
+struct loop_info {
+ int lo_number;
+ dev_t lo_device;
+ unsigned long lo_inode;
+ dev_t lo_rdevice;
+ int lo_offset;
+ int lo_encrypt_type;
+ int lo_encrypt_key_size;
+ int lo_flags;
+ char lo_name[LO_NAME_SIZE];
+ unsigned char lo_encrypt_key[LO_KEY_SIZE];
+ unsigned long lo_init[2]...
2019 Oct 31
3
[PATCH 1/2] loop: fix loop_info struct
Otherwise, stack can be corrupted resulting in incorrect runtime
behaviour. For example, overriding argc from main().
References: https://bugs.launchpad.net/ubuntu/+source/klibc/+bug/1850184
Signed-off-by: Michael Hudson-Doyle <michael.hudson at ubuntu.com>
Signed-off-by: Adam Conrad <adconrad at ubuntu.com>
Signed-off-by: Dimitri John Ledkov <xnox at ubuntu.com>
---
2019 Nov 05
0
[klibc:master] losetup: Delete fallbacks to LOOP_{GET, SET}_STATUS
...->lo_init[1] = info64->lo_init[1];
- if (info->lo_encrypt_type == LO_CRYPT_CRYPTOAPI)
- memcpy(info->lo_name, info64->lo_crypt_name, LO_NAME_SIZE);
- else
- memcpy(info->lo_name, info64->lo_file_name, LO_NAME_SIZE);
- memcpy(info->lo_encrypt_key, info64->lo_encrypt_key, LO_KEY_SIZE);
-
- /* error in case values were truncated */
- if (info->lo_device != info64->lo_device ||
- info->lo_rdevice != info64->lo_rdevice ||
- info->lo_inode != info64->lo_inode ||
- info->lo_offset != info64->lo_offset)
- return -EOVERFLOW;
-
- return 0;
-}
-
-
static...