search for: checksum_seed

Displaying 20 results from an estimated 31 matches for "checksum_seed".

2004 Mar 10
1
MD4 checksum_seed
Hi, The following lines in compat.c are rather imprudent: if (read_batch || write_batch) checksum_seed = 32761; else checksum_seed = time(NULL); write_int(f_out,checksum_seed); Setting checksum_seed to a constant in batch mode means block collisions are reproducible and predictable. Thus, some files will be permanently "unlucky" in batch mode and will always need retransm...
2004 May 15
1
Fwd: Re: setting checksum_seed
...e possibility of getting it into CVS or the patches directory? Thanks, Craig ---------- Forwarded message ---------- To: jw schultz <jw@pegasys.ws> From: Craig Barratt <cbarratt@users.sourceforge.net> cc: rsync@lists.samba.org Date: Sat, 01 May 2004 17:06:10 -0700 Subject: Re: setting checksum_seed jw schultz writes: > > > There was some talk last year about adding a --fixed-checksum-seed > > > option, but no consensus was reached. It shouldn't hurt to make the > > > seed value constant for certain applications, though, so you can feel > > > free to...
2004 Feb 09
1
checksum_seed
What is the point to checksum_seed? When reading/writing batch, it is initialized to a constant value, otherwise it is initialized to time(NULL). It certainly has no useful cryptographic value :) I got the go-ahead from the client on my --link-by-hash proposal, and the seed is making the hash unstable. I can't figure out why...
2004 Jul 12
2
[PATCH] Batch-mode rewrite
...-c -b -d -r1.22 compat.c *** compat.c 11 May 2004 17:25:01 -0000 1.22 --- compat.c 12 Jul 2004 00:37:46 -0000 *************** *** 28,33 **** --- 28,36 ---- int remote_protocol = 0; extern int am_server; + extern int am_sender; + extern int write_batch; + extern int batch_fd; extern int checksum_seed; *************** *** 73,83 **** --- 76,138 ---- exit_cleanup(RERR_PROTOCOL); } + /* CAS: I think this is a good candidate for a protocol + * change. Instead of: + * + * if (am_server) write_int() stuff; + * else read_int() stuff; + * + * it is good to remove the proto...
2004 Apr 08
2
[librsync-devel] librsync and rsync vulnerability to maliciously crafted data. was Re: MD4 checksum_seed
...separate process. I can see arguments either way. > > In some cases you might prefer to actually store an signed signature > using something like GPG. Yeah... good point. The rdiff program should probably use a whole file md4sum though. > > librsync could benefit from a random checksum_seed. It would need to be > > included in the signature. Without it librsync is vulnerable to cases 1) > > and 3). > > Random with respect to what? I think it would be nice if repeatedly > summing identicaly files gave identical signatures. Maybe it can vary > depending on onl...
2002 Aug 04
1
MD4 bug in rsync for lengths = 64 * n
....9.3 and the Intermezzo perl interface to librsync written by Shirish Phatak. However, as I'm sure is well-known, the Adler crc32 and MD4 computed by librsync don't match those in rsync 2.5.5. After swapping the crc32 endianess, changing RS_CHAR_OFFSET from 31 to 0, and adding rsync's checksum_seed to librsync's MD4 they now agree, except in one case: when the total data length (including the 4 byte checksum_seed) is a multiple of 64, the MD4 checksums in librsync and rsync don't agree. After reviewing the code in librsync, rsync and the original RSA implementation, I believe the bug...
2011 Jan 11
1
--detect-renamed for mac users : proposition of a modification
...diff But the patch detect-renamed.diff is not compatible with one of the modifications of fileflags.diff The problem is minor : a) fileflags.diff inserts "extern int force_change;" line 33 diff --git a/compat.c b/compat.c --- a/compat.c +++ b/compat.c @@ -42,9 +42,11 @@ extern int checksum_seed; extern int basis_dir_cnt; extern int prune_empty_dirs; extern int protocol_version; +extern int force_change; extern int protect_args; extern int preserve_uid; extern int preserve_gid; b) detect-renamed.diff overlaps the previous hunk of fileflags.diff : line 36 : diff --git a/compa...
2003 May 08
5
MD4 bug-fix for protocol version 27
Hi, while implementing the rsync protocol in one of our projects I found that the current CVS version still has a MD4 bug. I'm using the FreeBSD libmd implementation and I still had checksum mismatches with protocol version 27 for files whose size was a multiple of 64 - 4 ( - 4 due to checksum_seed). A patch for todays CVS version is attached. Someone should also review the clean_fname() function in utils.c. I think it will not produce the intended result for constructs like "./////foo" or "bar/././". The former case might pose a security risk. I think the first two ifs s...
2013 Oct 24
0
patch for combining detect-renamed and fileflags patches (fwd)
...------------------ -------------- next part -------------- --- detect-renamed.diff.orig 2013-09-29 07:02:08.000000000 +0400 +++ detect-renamed.diff 2013-10-24 18:42:22.000000000 +0400 @@ -42,15 +42,15 @@ diff --git a/compat.c b/compat.c --- a/compat.c +++ b/compat.c -@@ -43,6 +43,7 @@ extern int checksum_seed; +@@ -39,6 +39,7 @@ + extern int fuzzy_basis; + extern int read_batch; + extern int delay_updates; ++extern int detect_renamed; + extern int checksum_seed; extern int basis_dir_cnt; extern int prune_empty_dirs; - extern int protocol_version; -+extern int detect_renamed; - extern int protect_arg...
2005 Jul 26
1
[patch] paranoid checksum checking
.../receiver.c 2005-04-14 02:42:13.000000000 +0100 --- rsync-new/receiver.c 2005-07-26 18:06:56.000000000 +0100 *************** extern int module_id; *** 46,51 **** --- 46,52 ---- extern int ignore_errors; extern int orig_umask; extern int keep_partial; + extern int always_checksum; extern int checksum_seed; extern int inplace; extern int delay_updates; *************** int recv_files(int f_in, struct file_lis *** 649,654 **** --- 650,669 ---- exit_cleanup(RERR_FILEIO); } + /* Check that the file written to local disk has the same + checksum as the fil...
2024 Mar 12
1
rsync segfaults when openssl fips is enabled
...g leading '/' from absolute path names > # file: opt/x > user.bla1="1234567890abcdef1234567890abcdef1" --------> 33 bytes long > > After examining the coredump file, this happens at; > > rsync/xattrs.c > Line 277 in 2f9b963 > > sum_init(xattr_sum_nni, checksum_seed); > > Here md5 is used by default and md5 usage is prohibited in fips mode. > > Is there any way to workaround this problem? Also, why not use xxhash for this operation like it's used by default during --checksum option. > > -- > Shedi > -------------- next part --------...
2020 Feb 09
2
[RFC PATCH] Add SHA1 support
...+ mdctx = mdlib_new_ctx(); + if (!mdctx) + out_of_memory("get_checksum2"); + + if (xfersum_type == CSUM_MD5) + mdlib_init_md5(mdctx); + else if (xfersum_type == CSUM_SHA1) + mdlib_init_sha1(mdctx); + else + out_of_memory("wrong checksum"); + + if (proper_seed_order) { + if (checksum_seed) { + SIVALu(seedbuf, 0, checksum_seed); + mdlib_update(mdctx, seedbuf, 4); + } + mdlib_update(mdctx, buf, len); + } else { + mdlib_update(mdctx, buf, len); + if (checksum_seed) { + SIVALu(seedbuf, 0, checksum_seed); + mdlib_update(mdctx, seedbuf, 4); + } + } + mdlib_finalize(mdctx, sum...
2001 Aug 06
1
merge rsync+ into rsync (was Re: rsync-2.4.7 NEWS file)
> Just curious: what about the rsync+ patch? Thanks for the reminder. I've just committed Jos's rsync+ patch onto the "branch_mbp_rsyncplus_merge" branch. If it works OK and nobody screams I will move it across onto the main tree tomorrow or Wednesday. I see the patch doesn't add documentation about the new options to the man page, so we should fix that in the future.
2003 Mar 22
2
[RFC] protocol version
I'm in the midst of coding a patch set for consideration that will bump the protocol version and have a couple of observations. The current minimum backwards-compatible protocol is 15 but we have code that checks for protocol versions as old as 12. If someone else doesn't beat me to it i'm considering cleaning out the pre-15 compatibility code. A backwards compatibility patch could
2024 Feb 21
1
rsync segfaults when openssl fips is enabled
...-m '' -- /opt/x getfattr: Removing leading '/' from absolute path names # file: opt/x user.bla1="1234567890abcdef1234567890abcdef1" --------> 33 bytes long After examining the coredump file, this happens at; rsync/xattrs.c Line 277 in 2f9b963 sum_init(xattr_sum_nni, checksum_seed); Here md5 is used by default and md5 usage is prohibited in fips mode. Is there any way to workaround this problem? Also, why not use xxhash for this operation like it's used by default during --checksum option. -- Shedi -------------- next part -------------- An HTML attachment was scrubb...
2002 Jan 13
0
rsynd-2.5.1 / checksum.c patches
...m,OFF_T size) +void file_checksum(const char *fname, void *sum,OFF_T size) { OFF_T i; struct map_struct *buf; @@ -133,15 +134,17 @@ void sum_init(void) { - char s[4]; + unsigned char s[4]; mdfour_begin(&md); sumresidue=0; SIVAL(s,0,checksum_seed); sum_update(s,4); } -void sum_update(char *p,int len) +void sum_update(void *p1,int len) { +unsigned char * p; + p = (unsigned char *)p1; int i; if (len + sumresidue < CSUM_CHUNK) { memcpy(sumrbuf+sumresidue, p, len); @@ -170,7 +173,7 @@...
2004 Mar 10
0
RFE: create batch without patching
...such a "blind" batch fileset may be faulty. In the above scenario that's not a serious problem -- after patching from the batch fileset on the CD-R, I'll run rsync in normal mode over the network to fix whatever's broken (or just rely on a large csum_length, once the MD4 hash checksum_seed issue I explained yesterday is addressed). Other plausible motivating scenarios: * Using a patch fileset for an incremental backup that lets you to revert to the base copy * Estimating the bandwidth/time an rsync operation will take before actually carrying it out * Preparing several filesets for...
2004 Dec 06
1
port and double-colon
...--ipv6 prefer IPv6\n"); @@ -404,6 +405,7 @@ {"no-implied-dirs", 0, POPT_ARG_VAL, &implied_dirs, 0, 0, 0 }, {"protocol", 0, POPT_ARG_INT, &protocol_version, 0, 0, 0 }, {"checksum-seed", 0, POPT_ARG_INT, &checksum_seed, 0, 0, 0 }, + {"port", 0, POPT_ARG_INT, &rsync_port, 0, 0, 0 }, #ifdef INET6 {"ipv4", '4', POPT_ARG_VAL, &default_af_hint, AF_INET, 0, 0 }, {"ipv6", '6', POPT_ARG_VAL, &default_af_hint, AF_...
2004 Apr 15
0
Multiple compare-dest args
...0, 0 }, {"link-dest", 0, POPT_ARG_STRING, 0, OPT_LINK_DEST, 0, 0 }, /* TODO: Should this take an optional int giving the compression level? */ {"compress", 'z', POPT_ARG_NONE, &do_compression, 0, 0, 0 }, @@ -564,9 +565,31 @@ checksum_seed = FIXED_CHECKSUM_SEED; break; + case OPT_COMPARE_DEST: +#if HAVE_LINK + if (num_comp_dest >= MAX_COMP_DEST-1) { + rprintf(FERROR, "ERROR: %s\n", "too many --compare-dest args given"); + return 0; + } + compare_dest[num_comp_dest] = (char *)poptGetOptArg(pc)...
2011 Nov 28
0
RFC: [PATCH] Add TCP congestion control and Diffserv options
...l", 0, POPT_ARG_INT, &protocol_version, 0, 0, 0 }, + {"congestion-alg", 0, POPT_ARG_STRING, &congestion_alg, 0, 0, 0 }, + {"diffserv", 0, POPT_ARG_INT, &diffserv, 0, 0, 0 }, {"checksum-seed", 0, POPT_ARG_INT, &checksum_seed, 0, 0, 0 }, {"server", 0, POPT_ARG_NONE, 0, OPT_SERVER, 0, 0 }, {"sender", 0, POPT_ARG_NONE, 0, OPT_SENDER, 0, 0 }, @@ -1054,6 +1060,8 @@ static void daemon_usage(enum logcode F) rprintf(F," --log-file=FILE override the \"...