Determining channel frequency response from measured data via IFFT
Without seeing your code directly, my guess is that you're doing something like:

N = length(x);
X = fft(x,N);
Y = fft(y,N);
H = Y./X;
h = ifft(H);


The problem with doing that is this operation performs circular convolution over a length of N.  The trouble is, the "true" length of the convolution of y with 1/X's impulse response will be of length 2N - 1 (assuming x and y are both of length N).

So you are getting time domain aliasing.

The solution is probably to set

N = length(x) + length(y) - 1


or greater.