An error with respect to filter weights in CNN during the backpropagation Let's say a convolutional layer takes an input $X$ with dimensions of 5x100x100 and applies 10 filters $F$ 5x5x5, thus produces an output $O$ 10 feature maps 96x96.

During the backpropagation the layer receives $\frac{dE}{dO}$ of shape 10x96x96.

My question is how to compute $\frac{dE}{dF}$ ? 

According to that article $\frac{dE}{dF}$ can be calculated as convolution between $X$ and $\frac{dE}{dO}$. Unfortunately, the article does not cover a case with multiple filters and multiple input channels.

Since $X$ has shape 5x100x100 and $\frac{dE}{dO}$ has shape 10X96x96 the depth of $X$ equals to 5 and the depth of $\frac{dE}{dO}$ equals to 10. So the depth dimension does not match. How to compute convolution in that case ?
One possible option is padding the lower dimensional object to match the size of the higher dimensional object. Padding is most commonly done so the input and output volume will always have the same spatial dimensions. The additional cells could be padded with any value. It is most common to use zero or the mean of the other cells, depending on the filter operation.