Ankles and knees get sores in most dogs if not all, what your photos show are at very strange places to be sores, probably a bug of somekind and at a wild guess some kind of allergic reaction? do not really know.